@Test public void whenOtherErrorRescheduleAfterMaxPause() throws Exception { when(sweepIteration.call()).thenReturn( SweepIterationResults.otherError(), SweepIterationResults.otherError(), SUCCESS_MEDIUM); schedulerWithDelay.start(2); runSweepIterations(2, SweepDelay.DEFAULT_MAX_PAUSE_MILLIS); runSweepIterations(5, DELAY); verify(sweepIteration, times(7 * 2)).call(); }
void start(int initialThreads) { for (int i = 0; i < initialThreads; i++) { increaseNumberOfTasks(INITIAL_DELAY); } }
ScalingSweepTaskScheduler implements Closeable { void start(int initialThreads) { for (int i = 0; i < initialThreads; i++) { increaseNumberOfTasks(INITIAL_DELAY); } } }
ScalingSweepTaskScheduler implements Closeable { void start(int initialThreads) { for (int i = 0; i < initialThreads; i++) { increaseNumberOfTasks(INITIAL_DELAY); } } ScalingSweepTaskScheduler(
            ScheduledExecutorService executorService,
            Clock clock,
            SweepDelay delay,
            Duration coolDown,
            Callable<SweepIterationResult> singleIteration,
            BooleanSupplier scalingEnabled); }
ScalingSweepTaskScheduler implements Closeable { void start(int initialThreads) { for (int i = 0; i < initialThreads; i++) { increaseNumberOfTasks(INITIAL_DELAY); } } ScalingSweepTaskScheduler(
            ScheduledExecutorService executorService,
            Clock clock,
            SweepDelay delay,
            Duration coolDown,
            Callable<SweepIterationResult> singleIteration,
            BooleanSupplier scalingEnabled); static ScalingSweepTaskScheduler createStarted(
            SweepDelay delay,
            int initialThreads,
            Callable<SweepIterationResult> task,
            BooleanSupplier scalingEnabled); @Override void close(); }
ScalingSweepTaskScheduler implements Closeable { void start(int initialThreads) { for (int i = 0; i < initialThreads; i++) { increaseNumberOfTasks(INITIAL_DELAY); } } ScalingSweepTaskScheduler(
            ScheduledExecutorService executorService,
            Clock clock,
            SweepDelay delay,
            Duration coolDown,
            Callable<SweepIterationResult> singleIteration,
            BooleanSupplier scalingEnabled); static ScalingSweepTaskScheduler createStarted(
            SweepDelay delay,
            int initialThreads,
            Callable<SweepIterationResult> task,
            BooleanSupplier scalingEnabled); @Override void close();  }