From: Tim Kourt <tim.a.kourt@linux.intel.com>
To: iwd@lists.01.org
Subject: [PATCH v3 3/3] auto-t: Fix event order
Date: Mon, 13 Apr 2020 18:16:45 -0700 [thread overview]
Message-ID: <20200414011645.22321-3-tim.a.kourt@linux.intel.com> (raw)
In-Reply-To: <20200414011645.22321-1-tim.a.kourt@linux.intel.com>
[-- Attachment #1: Type: text/plain, Size: 1720 bytes --]
In addition, use the conditional wait for the expected number
of known networks
---
autotests/testHotspot/autoconnect_test.py | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/autotests/testHotspot/autoconnect_test.py b/autotests/testHotspot/autoconnect_test.py
index edefb296..252a4b92 100644
--- a/autotests/testHotspot/autoconnect_test.py
+++ b/autotests/testHotspot/autoconnect_test.py
@@ -52,7 +52,8 @@ class Test(unittest.TestCase):
condition = 'obj.state == DeviceState.disconnected'
wd.wait_for_object_condition(device, condition)
- self.assertEqual(len(wd.list_known_networks()), 1)
+ condition = 'len(obj.list_known_networks()) == 1'
+ wd.wait_for_object_condition(wd, condition)
condition = 'obj.scanning'
wd.wait_for_object_condition(device, condition)
@@ -74,9 +75,6 @@ class Test(unittest.TestCase):
testutil.test_ifaces_connected(device.name, hapd_hotspot.ifname)
os.remove('/var/lib/iwd/hotspot/autoconnect.conf')
- IWD.copy_to_storage('ssidWPA2-1.psk')
-
- self.assertEqual(len(wd.list_known_networks()), 1)
#
# make sure removal of hotspot conf file resulted in disconnect
@@ -84,6 +82,11 @@ class Test(unittest.TestCase):
condition = 'obj.state == DeviceState.disconnected'
wd.wait_for_object_condition(device, condition)
+ IWD.copy_to_storage('ssidWPA2-1.psk')
+
+ condition = 'len(obj.list_known_networks()) == 1'
+ wd.wait_for_object_condition(wd, condition)
+
condition = 'obj.scanning'
wd.wait_for_object_condition(device, condition)
--
2.13.6
next prev parent reply other threads:[~2020-04-14 1:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-14 1:16 [PATCH v3 1/3] auto-t: Use proper connection status indicator Tim Kourt
2020-04-14 1:16 ` [PATCH v3 2/3] auto-t: Remove unused imports Tim Kourt
2020-04-14 1:16 ` Tim Kourt [this message]
2020-04-14 16:21 ` [PATCH v3 1/3] auto-t: Use proper connection status indicator 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=20200414011645.22321-3-tim.a.kourt@linux.intel.com \
--to=tim.a.kourt@linux.intel.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