Skip to content

Commit

Permalink
Forcing the reexecute a flaky test trying to figure out the reason
Browse files Browse the repository at this point in the history
  • Loading branch information
castorm committed May 22, 2020
1 parent 0cd7454 commit 2f2d88e
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ class AdaptableIntervalThrottlerTest {

@BeforeEach
void setUp() {
throttler = new AdaptableIntervalThrottler(__ -> config);
given(tailThrottler.getIntervalMillis()).willReturn(intervalMillis);
given(config.getTailThrottler()).willReturn(tailThrottler);
given(config.getCatchupThrottler()).willReturn(catchupThrottler);
throttler = new AdaptableIntervalThrottler(__ -> config);
throttler.configure(emptyMap());
}

Expand All @@ -85,9 +85,11 @@ void givenNewRecordsLastNotLongAgo_whenThrottle_thenTailThrottler() throws Inter
@Test
void givenNewRecordsLastLongAgo_whenThrottle_thenCatchupThrottler() throws InterruptedException {

throttler.throttle(offset(now.minus(intervalMillis, MILLIS)));
Offset offset = offset(now.minus(intervalMillis, MILLIS));

then(catchupThrottler).should().throttle(offset(now.minus(intervalMillis, MILLIS)));
throttler.throttle(offset);

then(catchupThrottler).should().throttle(offset);
then(tailThrottler).should(never()).throttle(any());
}

Expand Down

0 comments on commit 2f2d88e

Please sign in to comment.