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
This commit is contained in:
@@ -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 +
|
||||
|
||||
Reference in New Issue
Block a user