From 2cb3b7cf2ef6ec2c3ab7ec10eedcc1f438949f74 Mon Sep 17 00:00:00 2001 From: Tim Kourt Date: Tue, 2 Oct 2018 12:02:17 -0700 Subject: [PATCH] auto-t: add explicit scan and completion check The occasional race conditions used to cause the test to fail due to the empty list of ordered networks --- autotests/testKnownNetworks/known_network_test.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/autotests/testKnownNetworks/known_network_test.py b/autotests/testKnownNetworks/known_network_test.py index 49f5a3fc..8c8ae33d 100644 --- a/autotests/testKnownNetworks/known_network_test.py +++ b/autotests/testKnownNetworks/known_network_test.py @@ -14,6 +14,11 @@ class Test(unittest.TestCase): self.assertIsNotNone(devices) device = devices[0] + device.scan() + + condition = 'obj.scanning' + wd.wait_for_object_condition(device, condition) + condition = 'not obj.scanning' wd.wait_for_object_condition(device, condition)