Wireless Daemon for Linux
 help / color / mirror / Atom feed
From: James Prestwood <prestwoj@gmail.com>
To: iwd@lists.01.org
Subject: [PATCH 1/2] auto-t: increase wait time for blacklist test
Date: Wed, 08 Jul 2020 10:48:00 -0700	[thread overview]
Message-ID: <20200708174801.14447-1-prestwoj@gmail.com> (raw)

[-- 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

             reply	other threads:[~2020-07-08 17:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-08 17:48 James Prestwood [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200708174801.14447-1-prestwoj@gmail.com \
    --to=prestwoj@gmail.com \
    --cc=iwd@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox