Give the stalled-fetch test a timeout that a loaded runner's reading-cost fits in
CI / tests (pull_request) Has been cancelled

This commit is contained in:
2026-11-18 22:43:33 +01:00
parent 291d97a8f9
commit cf46cde1ec
2 changed files with 54 additions and 2 deletions
+3 -2
View File
@@ -302,8 +302,9 @@ class ChunkPreflightTool(unittest.TestCase):
def test_reads_origin_as_last_fetched_where_the_fetch_stalls_and_still_states_the_other_facts(self):
repo = Repo(self)
repo.stub_git(f'"fetch --quiet origin") exec {shutil.which("sleep")} 10;;')
done = repo.preflight("--worktree", CHUNK_PREFLIGHT_TIMEOUT="1")
repo.stub_git(f'"fetch --quiet origin") exec {shutil.which("sleep")} 30;;')
# The timeout also bounds `reading-cost`, so it stays well above what that takes on a loaded runner.
done = repo.preflight("--worktree", CHUNK_PREFLIGHT_TIMEOUT="5")
self.assertEqual(done.returncode, 0, done.stderr)
self.assertIn("as last fetched", done.stdout)
self.assertIn("item 3, L 2, E + I 5", done.stdout)