From 7ba566dbf7cb9df22f957346873b6dfdd04894ff Mon Sep 17 00:00:00 2001 From: junyulai Date: Wed, 19 May 2021 16:09:12 +0800 Subject: [PATCH] Fix TetheringTest crash on eng build startTrackDefaultNetwork was allowed to called multiple times before even though there is no one actually do it. However, in the TetheringTest#verifyDefaultNetworkRequestFiled, a manual invocation is used to ensure that function supports multiple entrance. But with aosp/1697371, startTrackDefaultNetwork is no longer allowed to be called multiple times, it would lead to log.wtf and crash system in eng build. Since the manual invocation of startTrackDefaultNetwork is not realistic and no longer valid anymore, remove the invocation that caused the trouble. Test: atest TetheringCoverageTests Bug: 188613493 Change-Id: I61f6088783d521fd17ae1e87370842b4239fbe75 --- .../src/com/android/networkstack/tethering/TetheringTest.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/Tethering/tests/unit/src/com/android/networkstack/tethering/TetheringTest.java b/Tethering/tests/unit/src/com/android/networkstack/tethering/TetheringTest.java index 2bc7fc4a53..48fc18d3a2 100644 --- a/Tethering/tests/unit/src/com/android/networkstack/tethering/TetheringTest.java +++ b/Tethering/tests/unit/src/com/android/networkstack/tethering/TetheringTest.java @@ -782,8 +782,6 @@ public class TetheringTest { assertTrue(TestConnectivityManager.looksLikeDefaultRequest(reqCaptor.getValue())); // The default network request is only ever filed once. verifyNoMoreInteractions(mCm); - mUpstreamNetworkMonitor.startTrackDefaultNetwork(mEntitleMgr); - verifyNoMoreInteractions(mCm); } private void verifyInterfaceServingModeStarted(String ifname) throws Exception {