autotest: correct upload/download-mission timeouts

This commit is contained in:
Peter Barker 2022-07-20 08:42:55 +10:00 committed by Peter Barker
parent e27b98f47e
commit aa7987a4fb
1 changed files with 2 additions and 2 deletions

View File

@ -7328,7 +7328,7 @@ Also, ignores heartbeats not from our target system'''
remaining_to_send = set(range(0, len(items))) remaining_to_send = set(range(0, len(items)))
sent = set() sent = set()
while True: while True:
if self.get_sim_time_cached() - tstart > (10 + len(items)/10): if self.get_sim_time_cached() - tstart > (10 + len(items)/10.0):
raise NotAchievedException("timeout uploading %s" % str(mission_type)) raise NotAchievedException("timeout uploading %s" % str(mission_type))
if len(remaining_to_send) == 0: if len(remaining_to_send) == 0:
self.progress("All sent") self.progress("All sent")
@ -7419,7 +7419,7 @@ Also, ignores heartbeats not from our target system'''
tstart = self.get_sim_time_cached() tstart = self.get_sim_time_cached()
remaining_to_receive = set(range(0, m.count)) remaining_to_receive = set(range(0, m.count))
next_to_request = 0 next_to_request = 0
timeout = m.count / 10 timeout = m.count / 10.0
timeout *= self.speedup / 10.0 timeout *= self.speedup / 10.0
timeout += 10 timeout += 10
while True: while True: