summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMingguang Xu <mingguangxu@google.com>2019-10-23 22:46:12 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2019-10-23 22:46:12 +0000
commit1c37a9bce91dcf7d522a713cb05bc0dd9777aab7 (patch)
tree1c93e6c7bb7c353aee219018cc216fafdbbd65e5 /tests
parent2b675f5fc532687617bd8d29474657cab35285a0 (diff)
parent12bcb71c4267d7c380c02594571f4eff99613836 (diff)
Merge "Wifi usability: Clear the ring buffer after adding each usability stats to the upload list."
Diffstat (limited to 'tests')
-rw-r--r--tests/wifitests/src/com/android/server/wifi/WifiMetricsTest.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/wifitests/src/com/android/server/wifi/WifiMetricsTest.java b/tests/wifitests/src/com/android/server/wifi/WifiMetricsTest.java
index f0defde0c..b3f1ed12e 100644
--- a/tests/wifitests/src/com/android/server/wifi/WifiMetricsTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/WifiMetricsTest.java
@@ -2967,9 +2967,10 @@ public class WifiMetricsTest extends WifiBaseTest {
dumpProtoAndDeserialize();
assertEquals(2 * WifiMetrics.MAX_WIFI_USABILITY_STATS_PER_TYPE_TO_UPLOAD,
mDecodedProto.wifiUsabilityStatsList.length);
- for (int i = 0; i < mDecodedProto.wifiUsabilityStatsList.length; i++) {
+ for (int i = 0; i < WifiMetrics.MAX_WIFI_USABILITY_STATS_PER_TYPE_TO_UPLOAD; i++) {
assertEquals(WifiMetrics.MAX_WIFI_USABILITY_STATS_ENTRIES_LIST_SIZE,
- mDecodedProto.wifiUsabilityStatsList[i].stats.length);
+ mDecodedProto.wifiUsabilityStatsList[2 * i].stats.length);
+ assertEquals(2, mDecodedProto.wifiUsabilityStatsList[2 * i + 1].stats.length);
}
}