mirror of
https://github.com/openglow-org/forgefirm.git
synced 2026-09-27 08:41:13 -07:00
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.
This commit is contained in:
@@ -185,7 +185,10 @@ class CloudSuiteTests(unittest.TestCase):
|
|||||||
self.engine_line = EFFECTIVE_LINE # what the engine logs at the print; None = nothing
|
self.engine_line = EFFECTIVE_LINE # what the engine logs at the print; None = nothing
|
||||||
self.client_limits = True # the client names its header limits
|
self.client_limits = True # the client names its header limits
|
||||||
cloud.QUIET_S = 0.4
|
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
|
cloud.HUNT_TIMEOUT_S = 8
|
||||||
self.script = None
|
self.script = None
|
||||||
|
|
||||||
@@ -556,6 +559,7 @@ class CloudSuiteTests(unittest.TestCase):
|
|||||||
self.append(fixture("huntlid"))
|
self.append(fixture("huntlid"))
|
||||||
# a motion in flight (never idle within the timeout) fails, and says so
|
# a motion in flight (never idle within the timeout) fails, and says so
|
||||||
self.fc.state["status"]["state"] = "running"
|
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")
|
self.assertFails(cloud.enter_cloud, "still running service moves")
|
||||||
|
|
||||||
# -- the hunt with the lid open ------------------------------------------
|
# -- the hunt with the lid open ------------------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user