Add a delay before toggling WiFi to let listening activity to start up

testConnectivityChanged_manifestRequestOnlyPreN_shouldReceiveIntent()
starts up a helper activity that listens to network connection/disconnection
notification. In many cases the test fails because the activity is just
able to start up and initialize itself before the first toggle event
arrives and in many cases it just misses by a matter of 100ms.

Added a short sleep after we start the activity and before we start
toggling WiFi to let the activity a chance to receive the first
notification.

Bug: 70988664
Change-Id: Ie122770fc8447a936d079fae7bdce61b10cf6dc2
1 file changed
tree: f897ce06a3584b918a35be7258a4498b5b19d27c
  1. tests/