Merge "Fix testRestart" into rvc-dev
diff --git a/hostsidetests/statsd/src/android/cts/statsd/metric/MetricActivationTests.java b/hostsidetests/statsd/src/android/cts/statsd/metric/MetricActivationTests.java
index 3370e23..339970a 100644
--- a/hostsidetests/statsd/src/android/cts/statsd/metric/MetricActivationTests.java
+++ b/hostsidetests/statsd/src/android/cts/statsd/metric/MetricActivationTests.java
@@ -251,13 +251,13 @@
* Metric 3: No activations; always active
**/
public void testRestart() throws Exception {
- final int act1TtlSecs = 100;
- final int act2TtlSecs = 200;
+ final int act1TtlSecs = 200;
+ final int act2TtlSecs = 400;
uploadConfig(createConfig(act1TtlSecs, act2TtlSecs));
// Trigger Metric 1 Activation 1 and Metric 2 Activation 1.
// Time remaining:
- // Metric 1 Activation 1: 100 seconds
+ // Metric 1 Activation 1: 200 seconds
// Metric 1 Activation 2: 0 seconds
// Metric 2 Activation 1: 0 seconds (will activate after boot)
// Metric 2 Activation 2: 0 seconds
@@ -270,9 +270,9 @@
logAllMetrics();
// Time remaining:
- // Metric 1 Activation 1: 100 seconds
+ // Metric 1 Activation 1: 200 seconds
// Metric 1 Activation 2: 0 seconds
- // Metric 2 Activation 1: 100 seconds
+ // Metric 2 Activation 1: 200 seconds
// Metric 2 Activation 2: 0 seconds
rebootDeviceAndWaitUntilReady();
@@ -298,7 +298,7 @@
// Metric 1 Activation 1: 0 seconds
// Metric 1 Activation 2: 0 seconds (will activate after boot)
// Metric 2 Activation 1: 0 seconds
- // Metric 2 Activation 2: 200 seconds
+ // Metric 2 Activation 2: 400 seconds
doAppBreadcrumbReported(act2MatcherId);
Thread.sleep(10L);
@@ -309,10 +309,10 @@
// Trigger Metric 1 Activation 1 and Metric 2 Activation 1.
// Time remaining:
- // Metric 1 Activation 1: 100 seconds
+ // Metric 1 Activation 1: 200 seconds
// Metric 1 Activation 2: 0 seconds (will activate after boot)
// Metric 2 Activation 1: 0 seconds (will activate after boot)
- // Metric 2 Activation 2: 200 seconds
+ // Metric 2 Activation 2: 400 seconds
doAppBreadcrumbReported(act1MatcherId);
Thread.sleep(10L);
@@ -322,17 +322,17 @@
logAllMetrics();
// Time remaining:
- // Metric 1 Activation 1: 50 seconds
+ // Metric 1 Activation 1: 100 seconds
// Metric 1 Activation 2: 0 seconds (will activate after boot)
// Metric 2 Activation 1: 0 seconds (will activate after boot)
- // Metric 2 Activation 2: 150 seconds
+ // Metric 2 Activation 2: 300 seconds
Thread.sleep(act1TtlSecs * 1000L / 2);
// Time remaining:
- // Metric 1 Activation 1: 50 seconds
- // Metric 1 Activation 2: 200 seconds
- // Metric 2 Activation 1: 100 seconds
- // Metric 2 Activation 2: 150 seconds
+ // Metric 1 Activation 1: 100 seconds
+ // Metric 1 Activation 2: 400 seconds
+ // Metric 2 Activation 1: 200 seconds
+ // Metric 2 Activation 2: 300 seconds
rebootDeviceAndWaitUntilReady();
// Fourth logged event for Metric 1.
@@ -343,9 +343,9 @@
// Expire Metric 1 Activation 1.
// Time remaining:
// Metric 1 Activation 1: 0 seconds
- // Metric 1 Activation 2: 150 seconds
- // Metric 2 Activation 1: 50 seconds
- // Metric 2 Activation 2: 100 seconds
+ // Metric 1 Activation 2: 300 seconds
+ // Metric 2 Activation 1: 100 seconds
+ // Metric 2 Activation 2: 200 seconds
Thread.sleep(act1TtlSecs * 1000L / 2);
// Fifth logged event for Metric 1.