Skip to content

Commit

Permalink
test: increment time continously
Browse files Browse the repository at this point in the history
In order to prevent for flakiness the time needs to be increased
everytime so we can retrigger the position distribution.
  • Loading branch information
Zelldon committed Jan 3, 2022
1 parent 1f6bd9b commit fc0f9c6
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ public void shouldDistributeExporterPositions() {

// then
Awaitility.await("Active Director has distributed positions and passive has received it")
.conditionEvaluationListener(
condition -> activeExporters.getClock().addTime(DISTRIBUTION_INTERVAL))
.untilAsserted(
() -> {
assertThat(passiveExporterState.getPosition(EXPORTER_ID_1)).isEqualTo(position);
Expand Down Expand Up @@ -133,6 +135,8 @@ public void shouldNotResetExporterPositionWhenOldPositionReceived() {

final var passiveExporterState = passiveExporters.getExportersState();
Awaitility.await("Active Director has distributed positions and passive has received it")
.conditionEvaluationListener(
condition -> activeExporters.getClock().addTime(DISTRIBUTION_INTERVAL))
.untilAsserted(
() -> {
assertThat(passiveExporterState.getPosition(EXPORTER_ID_1)).isEqualTo(position);
Expand Down

0 comments on commit fc0f9c6

Please sign in to comment.