From 71b44598eb9e5823ce660928762352de4305f91e Mon Sep 17 00:00:00 2001 From: ScottW514 Date: Tue, 22 Sep 2026 23:54:12 -0400 Subject: [PATCH] test_cloud_suite: the quiet wait's deadline is no longer the test The cloud suite's host tests replay a print's log from threads, and the suite's quiet wait gave up after 3 s (QUIET_TIMEOUT_S in setUp). On a loaded host the last replayed lines landed after that, and a test failed with "still running service moves after 3 s" instead of its own finding: about one run of the module in five, a different test each time, alone as well as under the full suite. The deadline is now 15 s. It is a deadline and not a wait: a quiet machine is seen at once, so a passing run is no slower. The one test that waits the deadline out on purpose (a motion that never goes idle) sets 3 s for itself; tearDown puts the module's value back. Proof: before, test_cloud_suite failed 2 of 10 runs by itself, every failure the quiet deadline (test_lid_during_button_wait_on_the_bench_excerpt, test_pause_resume_fails_without_the_retraced_restart, test_mode_switch_fails_when_gfhome_never_saw_the_head_move, test_pause_resume_fails_when_the_kernel_refuses_the_resume). After, 10 of 10. forgetest's whole unit suite: 451 tests OK, 4 skipped, in 492 s against 491 s before. A host-test change: no catalog consequence. --- forgetest/tests/test_cloud_suite.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/forgetest/tests/test_cloud_suite.py b/forgetest/tests/test_cloud_suite.py index de17a64..1b96fdf 100644 --- a/forgetest/tests/test_cloud_suite.py +++ b/forgetest/tests/test_cloud_suite.py @@ -185,7 +185,10 @@ class CloudSuiteTests(unittest.TestCase): self.engine_line = EFFECTIVE_LINE # what the engine logs at the print; None = nothing self.client_limits = True # the client names its header limits cloud.QUIET_S = 0.4 - cloud.QUIET_TIMEOUT_S = 3 + # A deadline, not a wait: a quiet machine is seen at once. The + # replays land their lines from threads, so under a loaded host a + # tighter deadline expires before the last of them is written. + cloud.QUIET_TIMEOUT_S = 15 cloud.HUNT_TIMEOUT_S = 8 self.script = None @@ -556,6 +559,7 @@ class CloudSuiteTests(unittest.TestCase): self.append(fixture("huntlid")) # a motion in flight (never idle within the timeout) fails, and says so self.fc.state["status"]["state"] = "running" + cloud.QUIET_TIMEOUT_S = 3 # this one waits the deadline out; tearDown puts it back self.assertFails(cloud.enter_cloud, "still running service moves") # -- the hunt with the lid open ------------------------------------------