Skip to content

Commit 2485b57

Browse files
committed
Stop test when field test runner can't receive worlds
1 parent f4b64d5 commit 2485b57

1 file changed

Lines changed: 10 additions & 12 deletions

File tree

src/software/gameplay_tests/field_test_runner.py

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -90,18 +90,16 @@ def _runner(
9090
# remove command from the list
9191
gc_cmd_with_delay.remove((delay, cmd, team))
9292

93-
while True:
94-
try:
95-
world = self.world_buffer.get(
96-
block=True, timeout=WORLD_BUFFER_TIMEOUT
97-
)
98-
break
99-
except queue.Empty:
100-
# If we timeout, that means full_system missed the last
101-
# wrapper and robot status, lets resend it.
102-
logger.warning(
103-
f"No World was received for {WORLD_BUFFER_TIMEOUT} seconds. Ending test early."
104-
)
93+
# Try to get the world; if can't receive for timeout,
94+
# something went wrong with either FullSystem or SSL Vision
95+
try:
96+
world = self.world_buffer.get(block=True, timeout=WORLD_BUFFER_TIMEOUT)
97+
break
98+
except queue.Empty:
99+
logger.warning(
100+
f"No World was received for {WORLD_BUFFER_TIMEOUT} seconds. Ending test early."
101+
)
102+
self._stopper()
105103

106104
# Validate
107105
(

0 commit comments

Comments
 (0)