mirror of
https://github.com/ProjectLeonida/mandy.git
synced 2026-12-06 15:18:38 +00:00
tests: the quick-program GPU timeout case no longer races Python startup (TEST-GPU-TIMEOUT-QUICK-LOAD)
test_quick_program_is_unaffected ran `python -c "print('ok')"` under the
0.5 s limit the hang cases use. On a loaded Windows host starting the child
alone can take longer, so the quick program was killed and the test failed
for the wrong reason (3 of 10 runs with the CPU saturated). That one case now
runs under a 60 s limit, still a limit; the hang cases keep 0.5 s.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014sDZDAAcsauTL6d8ie67Qo
This commit is contained in:
@ -99,9 +99,13 @@ class HungProgram(unittest.TestCase):
|
||||
self.assertIn("0/1 passed", out.getvalue())
|
||||
|
||||
def test_quick_program_is_unaffected(self):
|
||||
self.assertEqual(run_gpu_tests.run_cmd(QUICK), (0, "ok"))
|
||||
rc, out = check.run(*QUICK)
|
||||
self.assertEqual((rc, out.strip()), (0, "ok"))
|
||||
# A limit is still in force, but not the hang cases' 0.5 s: starting a Python child alone can take longer than
|
||||
# that on a loaded Windows host, which killed the quick program and failed this test for the wrong reason.
|
||||
with patch.dict(os.environ, {"LEONIDA_GPU_TEST_TIMEOUT": "60"}):
|
||||
self.assertEqual(check.gpu_test_timeout(), 60)
|
||||
self.assertEqual(run_gpu_tests.run_cmd(QUICK), (0, "ok"))
|
||||
rc, out = check.run(*QUICK)
|
||||
self.assertEqual((rc, out.strip()), (0, "ok"))
|
||||
|
||||
def test_translator_step_has_no_limit(self):
|
||||
seen = {}
|
||||
|
||||
Reference in New Issue
Block a user