From 7b3777b145cdcce010df17ab92f0fa83f89d911f Mon Sep 17 00:00:00 2001 From: Stuart Pernsteiner Date: Fri, 31 May 2024 15:53:48 -0700 Subject: [PATCH] mps: test runner: adjust delays when waiting for replies Previously, while `runner.py` was waiting for a response from the RTS, it would send an update-display (`D`) command every second. In the nested-VM setup, updating the display is fairly expensive due to the I/O involved. If the MPS got behind for any reason, in order to catch up, it would need to process not only the pending command but all the update-display commands that were sent while the test runner was waiting. Sending an update-display command every second thus severely exacerbated the slow performance of the nested-VM setup. This commit changes `runner.py` to send the update-display command every 10 seconds instead of every second. The test suite now behaves more reliably in the nested-VM setup. --- components/mission_protection_system/tests/runner.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/mission_protection_system/tests/runner.py b/components/mission_protection_system/tests/runner.py index f3a06809..d7021127 100755 --- a/components/mission_protection_system/tests/runner.py +++ b/components/mission_protection_system/tests/runner.py @@ -28,7 +28,7 @@ RTS_SOCKET = os.environ.get("RTS_SOCKET") RTS_DEBUG = os.environ.get("RTS_DEBUG") is not None -def try_expect(p,expected,timeout=1,retries=60): +def try_expect(p,expected,timeout=10,retries=10): expected = expected.strip() if RTS_DEBUG: print(f"CHECKING: {expected}")