From 349f7ed040a1c291a6b32e9112484d1c6636db76 Mon Sep 17 00:00:00 2001 From: Jun Tahara Date: Mon, 20 Jun 2016 14:47:29 +0900 Subject: [PATCH] Remove non-CTS packets assertion code Symptom: testTrafficStatsForLocalhost fails when applications or services except CTS are using network. Root cause: testTrafficStatsForLocalhost can't calculate the number of non-localhost packets for CTS. It includes the all of packets for applications/services except CTS and non-localhost packets for CTS. Solution: Remove this assertion and only logging the number of packets. Change-Id: I49243d59f359f3a543c6bdb46f6a2645cde8f292 --- tests/cts/net/src/android/net/cts/TrafficStatsTest.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/cts/net/src/android/net/cts/TrafficStatsTest.java b/tests/cts/net/src/android/net/cts/TrafficStatsTest.java index a8dd8acecc..930c74255d 100755 --- a/tests/cts/net/src/android/net/cts/TrafficStatsTest.java +++ b/tests/cts/net/src/android/net/cts/TrafficStatsTest.java @@ -214,8 +214,6 @@ public class TrafficStatsTest extends AndroidTestCase { 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 same UID", deltaTxOtherPackets + deltaRxOtherPackets < 20); } assertTrue("uidtxp: " + uidTxPacketsBefore + " -> " + uidTxPacketsAfter + " delta=" + uidTxDeltaPackets +