IpManagerTest: fix flaky test
Reset the callback mock for every onLinkPropertiesChange expected when pushing address updates on the BaseNetworkObserver. Bug: 32561414 Bug: 62918393 Test: runtest frameworks-net, IpManagerTest passes 200 times in a row Change-Id: I4719b4dc86044438243887634191c2d21686b80f
This commit is contained in:
@@ -180,7 +180,8 @@ public class IpManagerTest {
|
||||
// Add N - 1 addresses
|
||||
for (int i = 0; i < lastAddr; i++) {
|
||||
mObserver.addressUpdated(iface, new LinkAddress(addresses[i]));
|
||||
verify(mCb, timeout(100).times(1)).onLinkPropertiesChange(any());
|
||||
verify(mCb, timeout(100)).onLinkPropertiesChange(any());
|
||||
reset(mCb);
|
||||
}
|
||||
|
||||
// Add Nth address
|
||||
|
||||
Reference in New Issue
Block a user