Add more timeout for verify the interaction of the mock object

The verification happened earlier than the interaction with
production code. This may happen in low performance devices,
e.g. cuttlefish. Add timeout for the verification to deflake
the test.

Bug: 313828402
Test: atest FrameworksNetTests
Change-Id: I1ffa7e7573d503eb0396aa211a90ba032175b3a1
This commit is contained in:
Chiachang Wang 2023-12-12 06:39:10 +00:00
commit d0535553c6

View file

@ -2979,7 +2979,7 @@ public class VpnTest extends VpnTestBase {
null /* iface */, RTN_UNREACHABLE));
assertEquals(expectedRoutes, lp.getRoutes());
verify(mMockNetworkAgent).unregister();
verify(mMockNetworkAgent, timeout(TEST_TIMEOUT_MS)).unregister();
}
@Test