Wireless Daemon for Linux
 help / color / mirror / Atom feed
* [PATCH 1/2] auto-t: increase wait time for blacklist test
@ 2020-07-08 17:48 James Prestwood
  2020-07-08 17:48 ` [PATCH 2/2] auto-t: remove busy wait for eapol reauth James Prestwood
  2020-07-08 23:29 ` [PATCH 1/2] auto-t: increase wait time for blacklist test Denis Kenzior
  0 siblings, 2 replies; 3+ messages in thread
From: James Prestwood @ 2020-07-08 17:48 UTC (permalink / raw)
  To: iwd

[-- Attachment #1: Type: text/plain, Size: 1260 bytes --]

This test was not reliably passing. Busy waiting is not really reliable,
but in this specific case its really the only option as the blacklist
must expire based on time.
---
 autotests/testBSSBlacklist/connection_test.py | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/autotests/testBSSBlacklist/connection_test.py b/autotests/testBSSBlacklist/connection_test.py
index 917f3192..7433d5f3 100644
--- a/autotests/testBSSBlacklist/connection_test.py
+++ b/autotests/testBSSBlacklist/connection_test.py
@@ -48,9 +48,11 @@ class Test(unittest.TestCase):
         psk_agent = PSKAgent("secret123")
         wd.register_psk_agent(psk_agent)
 
-        devices = wd.list_devices(1)
+        devices = wd.list_devices(2)
         device = devices[0]
 
+        devices[1].disconnect()
+
         condition = 'not obj.scanning'
         wd.wait_for_object_condition(device, condition)
 
@@ -110,8 +112,8 @@ class Test(unittest.TestCase):
         # Wait for the blacklist to expire (10 seconds)
         elapsed = time.time() - start
 
-        if elapsed < 11:
-            time.sleep(11 - elapsed)
+        if elapsed < 15:
+            wd.wait(15 - elapsed)
 
         device.disconnect()
 
-- 
2.21.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-07-08 23:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-08 17:48 [PATCH 1/2] auto-t: increase wait time for blacklist test James Prestwood
2020-07-08 17:48 ` [PATCH 2/2] auto-t: remove busy wait for eapol reauth James Prestwood
2020-07-08 23:29 ` [PATCH 1/2] auto-t: increase wait time for blacklist test Denis Kenzior

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox