From 38c8fe06a4ee9b09f908e1653c904595cd6c847b Mon Sep 17 00:00:00 2001 From: James Prestwood Date: Wed, 8 Jul 2020 10:48:00 -0700 Subject: [PATCH] auto-t: increase wait time for blacklist test 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()