Hi James,
On Wed, 6 May 2020 at 19:40, James Prestwood <prestwoj(a)gmail.com> wrote:
In certain cases the autoconnect portion of each subtest was
connecting
to the network so fast that the check for obj.scanning was never successful
since IWD was already connected (and in turn not scanning). Since the
autoconnect path will wait for the device to be connected there really isn't
a reason to wait for any scanning conditions. The normal connect path does
need to wait for scanning though, and for this an explicit call to scan was
added to ensure the network list gets populated.
You might want to reuse the logic in testEAP-TLS etc. where it first
checks if the scan is needed and then does what you did here,
condition = 'not obj.scanning'
wd.wait_for_object_condition(device, condition)
if not device.get_ordered_networks():
device.scan()
condition = 'obj.scanning'
wd.wait_for_object_condition(device, condition)
condition = 'not obj.scanning'
wd.wait_for_object_condition(device, condition)
ordered_network = device.get_ordered_network(ssid)
On the other hand when Scan() returns "Scanning" is supposed be true
immediately or a millisecond later, so we might want to add a short
timeout or convert this to an assert.
Best regards