Don't check broadcast intent on connection status check
testRequestNetworkCallback_onUnavailable is flaky because
the test expects a connectivity broadcast to be sent for the
lost network. But after testSetAirplaneMode, the wifi network
is not yet default network so a broadcast is never sent but
only onUnavailable is triggered. Replace disconnectFromWifi
with ensureWifiDisconnected to skip checking the broadcast.
Bug: 162323152
Test: atest CtsNetTestCasesLatestSdk:ConnectivityManagerTest\
--rerun-until-failure 20
Change-Id: I88f434798ec83539df9cc6a81446ca37a0081e3b
1 file changed
tree: 4dcca90a7259ac4972119204f20fe6f255512a3a
- tests/