From 810a62236ca892be3001bc24c325f41fe754efff Mon Sep 17 00:00:00 2001 From: JP Abgrall Date: Tue, 14 Jul 2015 18:59:40 -0700 Subject: [PATCH] Fix CTS build Revert "Merge "resolve merge conflicts of a97c792 to kitkat-cts-dev" into kitkat-cts-dev" This reverts commit 9feaaaf44682c72dc5c771c93ef01ec793b6a7e3, reversing changes made to 65fbe1fcd153c5647f8d1e1a7443b3f04b7b25fd. --- .../net/src/android/net/cts/TrafficStatsTest.java | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/tests/cts/net/src/android/net/cts/TrafficStatsTest.java b/tests/cts/net/src/android/net/cts/TrafficStatsTest.java index 74cd7718ea..5b93beead5 100755 --- a/tests/cts/net/src/android/net/cts/TrafficStatsTest.java +++ b/tests/cts/net/src/android/net/cts/TrafficStatsTest.java @@ -34,6 +34,7 @@ import java.util.concurrent.TimeUnit; public class TrafficStatsTest extends AndroidTestCase { private static final String LOG_TAG = "TrafficStatsTest"; + public void testValidMobileStats() { // We can't assume a mobile network is even present in this test, so // we simply assert that a valid value is returned. @@ -217,17 +218,6 @@ public class TrafficStatsTest extends AndroidTestCase { assertTrue("too many non-localhost packets on the sam UID", deltaTxOtherPackets + deltaTxOtherPackets < 20); } - // Some other tests don't cleanup connections correctly. - // They have the same UID, so we discount their lingering traffic - // which happens only on non-localhost, such as TCP FIN retranmission packets - long deltaTxOtherPackets = (totalTxPacketsAfter - totalTxPacketsBefore) - uidTxDeltaPackets; - long deltaRxOtherPackets = (totalRxPacketsAfter - totalRxPacketsBefore) - uidRxDeltaPackets; - if (deltaTxOtherPackets > 0 || deltaRxOtherPackets > 0) { - Log.i(LOG_TAG, "lingering traffic data: " + deltaTxOtherPackets + "/" + deltaRxOtherPackets); - // Make sure that not too many non-localhost packets are accounted for - assertTrue("too many non-localhost packets on the sam UID", deltaTxOtherPackets + deltaTxOtherPackets < 20); - } - assertTrue("uidtxp: " + uidTxPacketsBefore + " -> " + uidTxPacketsAfter + " delta=" + uidTxDeltaPackets + " Wanted: " + uidTxDeltaPackets + ">=" + packetCount + "+" + minExpectedExtraPackets + " && " + uidTxDeltaPackets + "<=" + packetCount + "+" + packetCount + "+" + maxExpectedExtraPackets + "+" + deltaTxOtherPackets,