Skip to content

Commit

Permalink
mps: test runner: adjust delays when waiting for replies
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
spernsteiner committed Jun 1, 2024
1 parent 6686ce7 commit 7b3777b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/mission_protection_system/tests/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
Expand Down

0 comments on commit 7b3777b

Please sign in to comment.