From 3ab487426e39bdf3be1419f202c785a2dd38a8c4 Mon Sep 17 00:00:00 2001 From: NeonKirill Date: Thu, 2 Jan 2025 19:33:36 +0100 Subject: [PATCH] improved testing logic --- tests/test_consumers.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/test_consumers.py b/tests/test_consumers.py index 05a7f78..1d6e063 100644 --- a/tests/test_consumers.py +++ b/tests/test_consumers.py @@ -140,7 +140,9 @@ def test_select_consumer_thread(self): self.assertTrue(test_thread.is_consuming) self.assertTrue(test_thread.channel.is_open) - test_thread.join(30) + test_thread.join() + while not test_thread.is_alive(): + sleep(0.1) self.assertFalse(test_thread.is_consuming) self.assertTrue(test_thread.channel.is_closed or test_thread.channel.is_closing)