autotest: raise exception if no simulated time available

Sucking the mavlink message queue dry unexpectedly is worse than any
tests being broken and failing with a clear error.
This commit is contained in:
Peter Barker 2019-10-15 16:45:11 +11:00 committed by Randy Mackay
parent 6e88982b39
commit 03c68f991c

View File

@ -560,7 +560,7 @@ class AutoTest(ABC):
"""Get SITL time in seconds."""
x = self.mav.messages.get("SYSTEM_TIME", None)
if x is None:
return self.get_sim_time()
raise NotAchievedException("No cached time available")
return x.time_boot_ms * 1.0e-3
def delay_sim_time(self, delay):