diff --git a/tests/cts/net/src/android/net/cts/EthernetManagerTest.kt b/tests/cts/net/src/android/net/cts/EthernetManagerTest.kt index 7fe9299b8e..706f3e88b4 100644 --- a/tests/cts/net/src/android/net/cts/EthernetManagerTest.kt +++ b/tests/cts/net/src/android/net/cts/EthernetManagerTest.kt @@ -667,6 +667,20 @@ class EthernetManagerTest { listener.expectCallback(iface, STATE_LINK_UP, ROLE_CLIENT) } + @Test + fun testCallbacks_afterRemovingServerModeInterface() { + // do not run this test if an interface that can be used for tethering already exists. + assumeNoInterfaceForTetheringAvailable() + + val iface = createInterface() + requestTetheredInterface().expectOnAvailable() + removeInterface(iface) + + val listener = EthernetStateListener() + addInterfaceStateListener(listener) + listener.assertNoCallback() + } + @Test fun testGetInterfaceList() { // Create two test interfaces and check the return list contains the interface names.