From 40b1dbfa04f206031940a61b62138de477d950e7 Mon Sep 17 00:00:00 2001 From: Sam Russell Date: Wed, 14 Nov 2018 19:18:46 +1300 Subject: [PATCH] dont merge - highlight race conditions in chewie test cases chewie tests load up all the responses and then set the ball rolling, but we can't rely on the radius sender to always be called before the radius receiver. we should implement #68 and get the mocks nice and in lock-step to test specific sequences of events --- test/test_chewie.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/test_chewie.py b/test/test_chewie.py index fd60f6a3..97662247 100644 --- a/test/test_chewie.py +++ b/test/test_chewie.py @@ -297,7 +297,9 @@ def test_success_dot1x(self): pool = eventlet.GreenPool() chewie_thread = pool.spawn(self.chewie.run) - eventlet.sleep(0.1) + while FROM_SUPPLICANT.qsize(): + eventlet.sleep() + eventlet.sleep() self.assertEqual( self.chewie.get_state_machine('02:42:ac:17:00:6f',