Skip to content

Commit

Permalink
Remove duplicated verifies
Browse files Browse the repository at this point in the history
  • Loading branch information
gastonfournier committed Nov 21, 2023
1 parent 2315713 commit c64d54a
Showing 1 changed file with 1 addition and 3 deletions.
Expand Up @@ -325,22 +325,20 @@ public void should_incrementally_increase_interval_as_we_receive_too_many_reques
bootstrapHandler);

runner.assertThatFetchesAndReceives(UNAVAILABLE, 429);
// client is not ready don't count errors or skips
assertThat(featureRepository.getSkips()).isEqualTo(0);
assertThat(featureRepository.getFailures()).isEqualTo(0);

runner.assertThatFetchesAndReceives(UNAVAILABLE, 429);
verify(fetcher, times(2)).fetchFeatures();
// client is not ready don't count errors or skips
assertThat(featureRepository.getSkips()).isEqualTo(0);
assertThat(featureRepository.getFailures()).isEqualTo(0);

// this changes the client to ready
runner.assertThatFetchesAndReceives(CHANGED, 200);
verify(fetcher, times(3)).fetchFeatures();
assertThat(featureRepository.getSkips()).isEqualTo(0);

runner.assertThatFetchesAndReceives(UNAVAILABLE, 429);
verify(fetcher, times(4)).fetchFeatures();
assertThat(featureRepository.getSkips()).isEqualTo(1);
assertThat(featureRepository.getFailures()).isEqualTo(1);

Expand Down

0 comments on commit c64d54a

Please sign in to comment.