Fix testIpClientIsNotStartedWhenLinkIsDown. am: 5216fc9eef
Original change: https://android-review.googlesource.com/c/platform/frameworks/opt/net/ethernet/+/1976968
Change-Id: I78ad7e8eb718ffceae8990c7ea7c9298ecd1617e
diff --git a/tests/ethernet/java/com/android/server/ethernet/EthernetNetworkFactoryTest.java b/tests/ethernet/java/com/android/server/ethernet/EthernetNetworkFactoryTest.java
index 6e7c267..e10497e 100644
--- a/tests/ethernet/java/com/android/server/ethernet/EthernetNetworkFactoryTest.java
+++ b/tests/ethernet/java/com/android/server/ethernet/EthernetNetworkFactoryTest.java
@@ -456,9 +456,10 @@
.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