From 3ecf09119603d59c8e0c5ed4d23ee8913f6aa7f0 Mon Sep 17 00:00:00 2001 From: James Prestwood Date: Fri, 1 Feb 2019 10:54:08 -0800 Subject: [PATCH] auto-t: clean up SAE autotests SAE has a clogging test which requires 4 radios to all simultaneously connect. All the other tests are only using one of these radios, so in these tests we explicitly disconnect these devices preventing them from autoconnecting. --- autotests/testSAE/autoconnect_test.py | 8 +++++++- autotests/testSAE/connection_test.py | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/autotests/testSAE/autoconnect_test.py b/autotests/testSAE/autoconnect_test.py index 8b0bf2b3..fa912ec4 100644 --- a/autotests/testSAE/autoconnect_test.py +++ b/autotests/testSAE/autoconnect_test.py @@ -14,10 +14,16 @@ class Test(unittest.TestCase): def test_connection_success(self): wd = IWD(True) - devices = wd.list_devices(1) + devices = wd.list_devices(4) self.assertIsNotNone(devices) device = devices[0] + # These devices aren't used in this test, this makes logs a bit nicer + # since these devices would presumably start autoconnecting. + devices[1].disconnect() + devices[2].disconnect() + devices[3].disconnect() + condition = 'not obj.scanning' wd.wait_for_object_condition(device, condition) diff --git a/autotests/testSAE/connection_test.py b/autotests/testSAE/connection_test.py index c3ad5c94..9bf61db1 100644 --- a/autotests/testSAE/connection_test.py +++ b/autotests/testSAE/connection_test.py @@ -25,10 +25,16 @@ class Test(unittest.TestCase): psk_agent = PSKAgent("secret123") wd.register_psk_agent(psk_agent) - devices = wd.list_devices(1) + devices = wd.list_devices(4) self.assertIsNotNone(devices) device = devices[0] + # These devices aren't used in this test, this makes logs a bit nicer + # since these devices would presumably start autoconnecting. + devices[1].disconnect() + devices[2].disconnect() + devices[3].disconnect() + condition = 'not obj.scanning' wd.wait_for_object_condition(device, condition)