Skip to content

Commit

Permalink
GEODE-7453: Fix Flaky Test (apache#4326)
Browse files Browse the repository at this point in the history
- Fixed flakiness in SessionExpirationCacheListenerIntegrationTest.
  • Loading branch information
jujoramos authored Nov 15, 2019
1 parent 22a8c26 commit c9e75e6
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ public void listenerShouldInvokeProcessExpiredMethodWhenSessionIsDestroyedDueToG
.create(REGION_NAME);
httpSessionRegion.put(deltaSession.getId(), deltaSession);

await().untilAsserted(() -> assertThat(httpSessionRegion.isEmpty()).isTrue());
assertThat(deltaSession.processExpiredCalls.get()).isEqualTo(1);
await().untilAsserted(() -> assertThat(deltaSession.processExpiredCalls.get()).isEqualTo(1));
assertThat(httpSessionRegion.isEmpty()).isTrue();
}

@Test
Expand All @@ -91,8 +91,8 @@ public void listenerShouldInvokeProcessExpiredMethodWhenSessionIsDestroyedDueToG
httpSessionRegion.put(deltaSession.getId(), deltaSession);

deltaSession.expire(true);
await().untilAsserted(() -> assertThat(httpSessionRegion.isEmpty()).isTrue());
assertThat(deltaSession.processExpiredCalls.get()).isEqualTo(1);
await().untilAsserted(() -> assertThat(deltaSession.processExpiredCalls.get()).isEqualTo(1));
assertThat(httpSessionRegion.isEmpty()).isTrue();
}

static class TestCustomExpiry implements CustomExpiry<String, HttpSession> {
Expand Down

0 comments on commit c9e75e6

Please sign in to comment.