summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormmanjuna <meghana.manjunatha@amd.com>2024-03-14 12:08:12 -0400
committermmanjuna <meghana.manjunatha@amd.com>2024-03-14 12:08:12 -0400
commit858c361f8053ba268b079f9cdc34459dc5c431ee (patch)
treed54183d38e0592f7bd251db3ce3286fd3a04d042
parent7cec098d8a80bb7623750837984d934864443cd6 (diff)
downloadStatsD-android13-tests-dev.tar.gz
Fix flaky behaviour in CTS test testSimpleEventCountMetricandroid13-tests-dev
Two events start/stop needs to be logged in 1 second bucket size. But sometimes the second event is logged in a extra bucket, resulting in assertion failure in the count value and bucket count. Fix is to increase the bucket size from 1 second to 1 minute to provide enough time to capture both events. Similar issue is fixed in https://android-review.googlesource.com/c/platform/packages/modules/StatsD/+/2954674 Bug: 329580324 Test: run cts -m CtsStatsdHostTestCases -t android.cts.statsd.metric.CountMetricsTests#testSimpleEventCountMetric Change-Id: I11b3f2e28efa7683378bcfb9ac8c6d9f7e65d38d
-rw-r--r--tests/src/android/cts/statsd/metric/CountMetricsTests.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/src/android/cts/statsd/metric/CountMetricsTests.java b/tests/src/android/cts/statsd/metric/CountMetricsTests.java
index 7eea703a..6d4fdb43 100644
--- a/tests/src/android/cts/statsd/metric/CountMetricsTests.java
+++ b/tests/src/android/cts/statsd/metric/CountMetricsTests.java
@@ -49,7 +49,7 @@ public class CountMetricsTests extends DeviceAtomTestCase {
StatsdConfigProto.StatsdConfig.Builder builder = createConfigBuilder();
builder.addCountMetric(StatsdConfigProto.CountMetric.newBuilder()
.setId(MetricsUtils.COUNT_METRIC_ID)
- .setBucket(StatsdConfigProto.TimeUnit.CTS)
+ .setBucket(StatsdConfigProto.TimeUnit.ONE_MINUTE)
.setWhat(matcherId))
.addAtomMatcher(MetricsUtils.simpleAtomMatcher(matcherId));
uploadConfig(builder);