From 49a829db7435ec3d1c53a840ea47925cd2471c52 Mon Sep 17 00:00:00 2001 From: Patrick Rohr Date: Wed, 17 Aug 2022 12:23:53 -0700 Subject: [PATCH] ethernet: remove buggy test expectations for compatibility EthernetManagerTest#testCallbacks() should not enforce up/up/down/up callbacks, so this bug can be fixed in mainline without breaking CTS13. Test: atest EthernetManagerTest Bug: 234314411 Change-Id: I1650bbc2a5883a874b92ecf2bcc7a56d01f4a905 Merged-In: I1650bbc2a5883a874b92ecf2bcc7a56d01f4a905 --- tests/cts/net/src/android/net/cts/EthernetManagerTest.kt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/cts/net/src/android/net/cts/EthernetManagerTest.kt b/tests/cts/net/src/android/net/cts/EthernetManagerTest.kt index 8b5774c225..a0fb29e8b8 100644 --- a/tests/cts/net/src/android/net/cts/EthernetManagerTest.kt +++ b/tests/cts/net/src/android/net/cts/EthernetManagerTest.kt @@ -335,11 +335,10 @@ class EthernetManagerTest { validateListenerOnRegistration(listener1) // If an interface appears, existing callbacks see it. - // TODO: fix the up/up/down/up callbacks and only send down/up. val iface2 = createInterface() - listener1.expectCallback(iface2, STATE_LINK_UP, ROLE_CLIENT) - listener1.expectCallback(iface2, STATE_LINK_UP, ROLE_CLIENT) - listener1.expectCallback(iface2, STATE_LINK_DOWN, ROLE_CLIENT) + // TODO: fix the up/up/down/up callbacks and only send down/up. Change to expectCallback + // once that is fixed. + listener1.eventuallyExpect(iface2, STATE_LINK_DOWN, ROLE_CLIENT) listener1.expectCallback(iface2, STATE_LINK_UP, ROLE_CLIENT) // Register a new listener, it should see state of all existing interfaces immediately.