fix BpfMapTest

to account for close() becoming a no-op

Bug: 230880517
Test: TreeHugger, atest com.android.networkstack.tethering.BpfMapTest
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I69f25ff168c1cf0f13434dd1d842ed81a6a03f2f
This commit is contained in:
Maciej Żenczykowski 2022-04-23 12:33:32 -07:00
commit 4426a84111

View file

@ -352,15 +352,6 @@ public final class BpfMapTest {
assertFalse(mTestMap.isEmpty());
mTestMap.clear();
assertTrue(mTestMap.isEmpty());
// Clearing an already-closed map throws.
mTestMap.close();
try {
mTestMap.clear();
fail("clearing already-closed map should throw");
} catch (IllegalStateException expected) {
// ParcelFileDescriptor.getFd throws IllegalStateException: Already closed.
}
}
@Test