autotest (wifi): reduce flake in network_WiFi_ConnectionIdentifier

In some trials of network_WiFi_ConnectionIdentifier, we
see that the ID is zero. This is probably due to a race
condition.

Specifically: we attempt to read the connection
ID when assert_connect_wifi() returns. But I don't believe
that there is any guarantee that ActiveLinkMonitor has
successfully ARPed the gateway at this point.

To address this race, we poll the service properties until
ConnectionId is non-zero (or until we time out).

BUG=chromium:502522
TEST=network_WiFi_ConnectionIdentifier (10 iterations)

Of the 10 iterations, 8 passed. The two failures were for other
reasons. (I.e., none of the failures were due to "Connection
ID mismatched".)

Change-Id: I17afab31ff25c021e56f2991588728cdececad45
Reviewed-on: https://chromium-review.googlesource.com/280901
Reviewed-by: Paul Stewart <pstew@chromium.org>
Reviewed-by: mukesh agrawal <quiche@chromium.org>
Tested-by: mukesh agrawal <quiche@chromium.org>
Commit-Queue: mukesh agrawal <quiche@chromium.org>
Trybot-Ready: mukesh agrawal <quiche@chromium.org>
1 file changed