Skip to content

Commit

Permalink
Increase timeout in test (#18937)
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmetmircik committed Jun 19, 2021
1 parent 0af9592 commit b80b074
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions hazelcast/src/test/java/com/hazelcast/map/EvictionTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
import com.hazelcast.query.Predicates;
import com.hazelcast.query.impl.PredicateBuilderImpl;
import com.hazelcast.spi.properties.ClusterProperty;
import com.hazelcast.test.AssertTask;
import com.hazelcast.test.HazelcastParallelParametersRunnerFactory;
import com.hazelcast.test.HazelcastTestSupport;
import com.hazelcast.test.OverridePropertyRule;
Expand Down Expand Up @@ -1061,11 +1062,15 @@ public void entryExpired(EntryEvent<Integer, Integer> event) {
map.get(i);
}

assertOpenEventually(evictedEntryLatch, 20);
assertOpenEventually(evictedEntryLatch);
// sleep some seconds to be sure that
// we did not receive more than expected number of events
sleepAtLeastSeconds(10);
assertEquals(numberOfEntriesToBeAdded, count.get());
assertTrueAllTheTime(new AssertTask() {
@Override
public void run() throws Exception {
assertEquals(numberOfEntriesToBeAdded, count.get());
}
}, 5);
}

private IMap<Integer, Integer> createMapWithReadBackupDataEnabled(int maxIdleSeconds) {
Expand Down

0 comments on commit b80b074

Please sign in to comment.