Ensure Wifi eventually becomes default

testSetOemNetworkPreferenceForTestOnlyPref may fail if Wifi is
connected but not validated when it starts, because wifi may not be the
system default network, so the first system default callbacks may be for
a different network.

Use eventuallyExpect to ensure the test waits for wifi to become
default. This will not work in configurations where wifi never becomes
default (if the device has a validated Ethernet network for example),
but this change at leastaddresses the flake in device configurations
where it will.

Bug: 260275298
Test: atest
Change-Id: I9034e923b2b5b38d1e38ec072abac9ee7e208fe2
1 file changed