Add EthernetTestInterface to list of created interfaces
This is a bug that was missed in my last CL. Newly created
EthernetTestIntefaces need to be added to the createdIfaces list, so
they are properly destroyed on tearDown.
Test: atest CtsNetTestCases:EthernetManagerTest
Change-Id: I53bd728a7ecb5a37ae89079ade0a3ebdae304a1a
diff --git a/tests/cts/net/src/android/net/cts/EthernetManagerTest.kt b/tests/cts/net/src/android/net/cts/EthernetManagerTest.kt
index 30e0015..f7a2421 100644
--- a/tests/cts/net/src/android/net/cts/EthernetManagerTest.kt
+++ b/tests/cts/net/src/android/net/cts/EthernetManagerTest.kt
@@ -177,7 +177,10 @@
}
private fun createInterface(): EthernetTestInterface {
- return EthernetTestInterface(context, Handler(Looper.getMainLooper()))
+ return EthernetTestInterface(
+ context,
+ Handler(Looper.getMainLooper())
+ ).also { createdIfaces.add(it) }
}
private fun setIncludeTestInterfaces(value: Boolean) {