Skip to content

Commit

Permalink
Merge pull request #1113 from wburns/ispn_fix_test
Browse files Browse the repository at this point in the history
Adding in delay in case if first assertion fails
  • Loading branch information
Sanne authored Feb 28, 2019
2 parents 6d7706e + 5e944dc commit ad0cc8c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 40 deletions.
35 changes: 0 additions & 35 deletions integration-tests/infinispan-client/README.md

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ public String nearCache() {

long misses = stats.getNearCacheMisses();
if (nearCacheMisses + 1 != misses) {
return "Near cache didn't miss for some reason. Expected: " + nearCacheMisses + 1 + " but got: " + misses;
return "Near cache didn't miss for some reason. Expected: " + (nearCacheMisses + 1) + " but got: " + misses;
}

if (!retrievedBook.equals(nearCacheBook)) {
Expand All @@ -280,7 +280,7 @@ public String nearCache() {
long hits = stats.getNearCacheHits();

if (nearCacheHits + 1 != hits) {
return "Near cache didn't hit for some reason. Expected: " + nearCacheHits + 1 + " but got: " + hits;
return "Near cache didn't hit for some reason. Expected: " + (nearCacheHits + 1) + " but got: " + hits;
}

if (!retrievedBook.equals(nearCacheBook)) {
Expand All @@ -293,8 +293,17 @@ public String nearCache() {

long invalidations = stats.getNearCacheInvalidations();
if (nearCacheInvalidations + 1 != invalidations) {
return "Near cache didn't invalidate for some reason. Expected: " + nearCacheInvalidations + 1 + " but got: "
+ invalidations;
// Try a second time after waiting just a little bit
try {
Thread.sleep(100);
} catch (InterruptedException e) {
throw new RuntimeException(e);
}
invalidations = stats.getNearCacheInvalidations();
if (nearCacheInvalidations + 1 != invalidations) {
return "Near cache didn't invalidate for some reason. Expected: " + (nearCacheInvalidations + 1) + " but got: "
+ invalidations;
}
}

cache.remove(id);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
*/
@QuarkusTest
@QuarkusTestResource(InfinispanServerTestResource.class)
@Disabled("Intermittently failing")
public class InfinispanClientFunctionalityTest {

@Test
Expand Down

0 comments on commit ad0cc8c

Please sign in to comment.