File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
app/src/androidTest/java/com/pcapplusplus/toyvpn Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -137,15 +137,15 @@ class ToyVpnServiceManagerTest {
137137 Log .e(" TestReceiveVpnStartedAndStoppedEvent" , " Before sending first broadcast" )
138138 context.sendBroadcast(intent)
139139 Log .e(" TestReceiveVpnStartedAndStoppedEvent" , " After sending first broadcast" )
140- waitFor { serviceManager.vpnServiceState.value == VpnConnectionState .CONNECTED }
140+ waitFor(timeoutMillis = 20000L ) { serviceManager.vpnServiceState.value == VpnConnectionState .CONNECTED }
141141 Log .e(" TestReceiveVpnStartedAndStoppedEvent" , " Passed first waitFor" )
142- waitFor { serviceManager.clientAddress.value == " 10.0.0.1" }
142+ waitFor(timeoutMillis = 20000L ) { serviceManager.clientAddress.value == " 10.0.0.1" }
143143 Log .e(" TestReceiveVpnStartedAndStoppedEvent" , " Passed second waitFor" )
144144
145145 Log .e(" TestReceiveVpnStartedAndStoppedEvent" , " Before sending second broadcast" )
146146 context.sendBroadcast(Intent (BroadcastActions .VPN_SERVICE_STOPPED ))
147147 Log .e(" TestReceiveVpnStartedAndStoppedEvent" , " After sending second broadcast" )
148- waitFor { serviceManager.vpnServiceState.value == VpnConnectionState .DISCONNECTED }
148+ waitFor(timeoutMillis = 20000L ) { serviceManager.vpnServiceState.value == VpnConnectionState .DISCONNECTED }
149149 Log .e(" TestReceiveVpnStartedAndStoppedEvent" , " Passed third waitFor" )
150150 }
151151
You can’t perform that action at this time.
0 commit comments