Make testVpnNetworkActive more deterministic.
This test is a bit brittle because it sets the underlying networks while the VPN is undergoing validation by NetworkMonitor. The test does attempt to disable validation, but that's not actually possible - the only thing that's possible is to tell NetworkMonitor to validate immediately without sending any probes. So the underlying network change races with the validation. I'm not sure why the test isn't flaky. It might be because both the network change and the validation result in a capabilities change, and the test expects "a capabilities change" without expressing what change that should be. Make this a bit more predictable by ensuring that the network validates before the underlying networks are set. This is useful because an upcoming CL will change the way underlying network capabilities are propagated. With this test CL, both the old and the new code pass. Bug: 172870110 Test: test-only change Change-Id: I319858228e8d097c0b60a107029f296385f91269 Merged-In: I319858228e8d097c0b60a107029f296385f91269
Loading
Please register or sign in to comment