mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 10:04:33 +02:00
improved arq tests which went stuck
This commit is contained in:
parent
fde3de12d6
commit
10be8db7d0
|
@ -182,7 +182,6 @@ class ARQSessionISS(arq_session.ARQSession):
|
||||||
self.states.setARQ(False)
|
self.states.setARQ(False)
|
||||||
|
|
||||||
self.arq_data_type_handler.failed(self.type_byte, self.data)
|
self.arq_data_type_handler.failed(self.type_byte, self.data)
|
||||||
|
|
||||||
return None, None
|
return None, None
|
||||||
|
|
||||||
def abort_transmission(self, irs_frame=None):
|
def abort_transmission(self, irs_frame=None):
|
||||||
|
|
|
@ -103,7 +103,7 @@ class TestARQSession(unittest.TestCase):
|
||||||
|
|
||||||
def waitForSession(self, q, outbound = False):
|
def waitForSession(self, q, outbound = False):
|
||||||
key = 'arq-transfer-outbound' if outbound else 'arq-transfer-inbound'
|
key = 'arq-transfer-outbound' if outbound else 'arq-transfer-inbound'
|
||||||
while True:
|
while True and self.channels_running:
|
||||||
ev = q.get()
|
ev = q.get()
|
||||||
if key in ev and ('success' in ev[key] or 'ABORTED' in ev[key]):
|
if key in ev and ('success' in ev[key] or 'ABORTED' in ev[key]):
|
||||||
self.logger.info(f"[{threading.current_thread().name}] {key} session ended.")
|
self.logger.info(f"[{threading.current_thread().name}] {key} session ended.")
|
||||||
|
@ -125,6 +125,7 @@ class TestARQSession(unittest.TestCase):
|
||||||
|
|
||||||
def waitAndCloseChannels(self):
|
def waitAndCloseChannels(self):
|
||||||
self.waitForSession(self.iss_event_queue, True)
|
self.waitForSession(self.iss_event_queue, True)
|
||||||
|
self.channels_running = False
|
||||||
self.waitForSession(self.irs_event_queue, False)
|
self.waitForSession(self.irs_event_queue, False)
|
||||||
self.channels_running = False
|
self.channels_running = False
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue