Skip to content

Commit

Permalink
invert eventually condition
Browse files Browse the repository at this point in the history
  • Loading branch information
pruivo committed Nov 4, 2021
1 parent c98fae3 commit a9baec1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
Expand Up @@ -143,11 +143,11 @@ protected void assertNoDataLeak(String cacheName) {
for (TestSite site : sites) {
// note: the cleanup is done asynchronously. trigger the process in all nodes
for (Cache<?,?> cache : site.getCaches(cacheName)) {
eventually("Updated keys map is not empty!", () -> isIracManagerEmpty(cache));
iracTombstoneManager(cache).startCleanupTombstone();
}
for (Cache<?,?> cache : site.getCaches(cacheName)) {
eventually("Tombstone map is not empty!", iracTombstoneManager(cache)::isEmpty);
eventually("Updated keys map is not empty!", () -> isIracManagerEmpty(cache));
}
}
}
Expand Down
15 changes: 8 additions & 7 deletions core/src/test/java/org/infinispan/xsite/AsyncBackupTest.java
Expand Up @@ -292,17 +292,18 @@ private void assertDataContainerState(String value) {

private void assertNoDataLeak() {
for (int i = 0; i < initialClusterSize; ++i) {
iracTombstoneManager(cache(LON, null, i)).startCleanupTombstone();
iracTombstoneManager(cache(NYC, null, i)).startCleanupTombstone();
Cache<?,?> lonCache = cache(LON, null, i);
Cache<?,?> nycCache = cache(NYC, null, i);
eventually("Updated keys map is not empty in LON!", () -> isIracManagerEmpty(lonCache));
eventually("Updated keys map is not empty in NYC!", () -> isIracManagerEmpty(nycCache));
iracTombstoneManager(lonCache).startCleanupTombstone();
iracTombstoneManager(nycCache).startCleanupTombstone();
}
for (int i = 0; i < initialClusterSize; ++i) {
Cache<?,?> lonCache = cache(LON, null, i);
eventually("Tombstone map is not empty in LON", iracTombstoneManager(lonCache)::isEmpty);
eventually("Updated keys map is not empty in LON!", () -> isIracManagerEmpty(lonCache));

Cache<?,?> nycCache = cache(NYC, null, i);
eventually("Tombstone map is not empty in NYC", iracTombstoneManager(lonCache)::isEmpty);
eventually("Updated keys map is not empty in NYC!", () -> isIracManagerEmpty(nycCache));
eventually("Tombstone map is not empty in LON", iracTombstoneManager(lonCache)::isEmpty);
eventually("Tombstone map is not empty in NYC", iracTombstoneManager(nycCache)::isEmpty);
}
}

Expand Down

0 comments on commit a9baec1

Please sign in to comment.