mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 10:04:33 +02:00
improved message tests which went stuck
This commit is contained in:
parent
10be8db7d0
commit
35276b01ef
|
@ -108,7 +108,7 @@ class TestMessageProtocol(unittest.TestCase):
|
|||
|
||||
def waitForSession(self, q, outbound=False):
|
||||
key = 'arq-transfer-outbound' if outbound else 'arq-transfer-inbound'
|
||||
while True:
|
||||
while True and self.channels_running:
|
||||
ev = q.get()
|
||||
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.")
|
||||
|
@ -130,6 +130,7 @@ class TestMessageProtocol(unittest.TestCase):
|
|||
|
||||
def waitAndCloseChannels(self):
|
||||
self.waitForSession(self.iss_event_queue, True)
|
||||
self.channels_running = False
|
||||
self.waitForSession(self.irs_event_queue, False)
|
||||
self.channels_running = False
|
||||
|
||||
|
|
Loading…
Reference in a new issue