Make debug atom fail more often.

10 is actually quite rare when the buckets are one hour long

Test: manual
Change-Id: I3fba8d9b7d182018453d37c50b13a479be6f45f5
This commit is contained in:
Olivier Gaillard
2019-02-04 14:25:14 +00:00
parent 12d08fd37a
commit 4f01a37853

View File

@@ -1780,8 +1780,8 @@ public class StatsCompanionService extends IStatsCompanionService.Stub {
long elapsedNanos, final long wallClockNanos, List<StatsLogEventWrapper> pulledData) {
StatsLogEventWrapper e = new StatsLogEventWrapper(tagId, elapsedNanos, wallClockNanos);
final long elapsedMillis = SystemClock.elapsedRealtime();
// Fails every 10 buckets.
if (mDebugFailingElapsedClockPullCount++ % 10 == 0) {
// Fails every 5 buckets.
if (mDebugFailingElapsedClockPullCount++ % 5 == 0) {
mDebugFailingElapsedClockPreviousValue = elapsedMillis;
throw new RuntimeException("Failing debug elapsed clock");
}