Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 22a9ab7a authored by Dmitri Plotnikov's avatar Dmitri Plotnikov
Browse files

Fix flaky test, BatteryStatsHistoryTest.startNextFragment

Bug: 394335078
Flag: TEST_ONLY
Test: atest PowerStatsTests; atest PowerStatsTestsRavenwood

Change-Id: Iac34ecb0ac2ff490645c325746007e9528ff8a61
parent 9456c277
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -456,6 +456,8 @@ public class BatteryStatsHistoryTest {
    }

    private void fillActiveFile(BatteryStatsHistory history) {
        awaitCompletion();      // Wait for BatteryHistoryDirectory.trim if necessary.

        // Create roughly 1K of history
        int initialSize = history.getHistoryUsedSize();
        while (history.getHistoryUsedSize() < initialSize + 1000) {