Fix testIpClientIsNotStartedWhenLinkIsDown.
This test is failing at HEAD because the known bug it is testing for is fixed. Check that IpClient is (correctly) not started when link is down. In order to ensure that the test is correct and that not starting IpClient is not caused by some other setup problem in the test, ensure that IpClient is also (correctly) started if later on link does come up. Test: atest EthernetServiceTests Test: atest --rerun-until-failure 100 EthernetNetworkFactoryTest#testIpClientIsNotStartedWhenLinkIsDown Change-Id: Id30bc9be1fc3ecf3d10c12d0b23c64814f4dbf9c
This commit is contained in:
@@ -456,9 +456,10 @@ public class EthernetNetworkFactoryTest {
|
||||
.build();
|
||||
mNetFactory.needNetworkFor(specificNetRequest);
|
||||
|
||||
// TODO(b/155707957): BUG: IPClient should not be started when the interface link state
|
||||
// is down.
|
||||
verify(mDeps).makeIpClient(any(), any(), any());
|
||||
verify(mDeps, never()).makeIpClient(any(), any(), any());
|
||||
|
||||
mNetFactory.updateInterfaceLinkState(TEST_IFACE, true, NULL_LISTENER);
|
||||
verify(mDeps).makeIpClient(any(), eq(TEST_IFACE), any());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user