From 9c5d40beca90d59964f6e6b74384f8c4e9a21dfe 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 Merged-In: I61f6088783d521fd17ae1e87370842b4239fbe75 Change-Id: I61f6088783d521fd17ae1e87370842b4239fbe75 (cherry-picked from aosp/1711433) --- .../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 2b158665cc..f1d8c0f6ea 100644 --- a/Tethering/tests/unit/src/com/android/networkstack/tethering/TetheringTest.java +++ b/Tethering/tests/unit/src/com/android/networkstack/tethering/TetheringTest.java @@ -785,8 +785,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 {