private void expectNothingToClean() { env.cleanLog(); final EnvironmentStats stats = env.getStats(null); final String msg = String.format( "%d probes, %d non-probes", stats.getNCleanerProbeRuns(), stats.getNCleanerRuns()); assertEquals(msg, 0, stats.getNCleanerRuns() - stats.getNCleanerProbeRuns()); }
private void expectBackgroundCleaning() { final long endTime = System.currentTimeMillis() + (30 * 1000); while (System.currentTimeMillis() < endTime) { final EnvironmentStats stats = env.getStats(null); if (stats.getNCleanerRuns() > 0) { return; } } close(); fail("Cleaner did not run"); }