From df65e6e30c3f224f0cc74926b98f3ee56df50dc7 Mon Sep 17 00:00:00 2001 From: Bruce Wayne Date: Fri, 7 Jun 2024 15:31:52 -0700 Subject: [PATCH] Fix test --- msgq/tests/test_poller.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/msgq/tests/test_poller.py b/msgq/tests/test_poller.py index 504e09f27..a68ff4fe7 100644 --- a/msgq/tests/test_poller.py +++ b/msgq/tests/test_poller.py @@ -108,7 +108,12 @@ def test_multiple_messages(self): if r is not None: self.assertEqual(b'a'*i, r) - msg_seen = Truemes + msg_seen = True + i += 1 + + if r is None and msg_seen: # ZMQ sometimes receives nothing on the first receive + break + del pub del sub context.term()