Give the stalled-fetch test a timeout that a loaded runner's reading-cost fits in
CI / tests (pull_request) Has been cancelled
CI / tests (pull_request) Has been cancelled
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user