Permalink
Browse files

checking of cache size up to 30 seconds, to prevent delays by other (…

…concurrent) tests to fail the assertion
  • Loading branch information...
1 parent 8102182 commit 5782d1d6e656d0778f56f096aef06232c396854b Bela Ban committed Dec 13, 2010
Showing with 6 additions and 1 deletion.
  1. +6 −1 tests/junit-functional/org/jgroups/tests/AgeOutCacheTest.java
@@ -34,7 +34,12 @@ public void expired(Integer key) {
System.out.println("cache:\n" + cache);
int size=cache.size();
assert size == 5 : "size is " + size;
- Util.sleep(1500);
+
+ for(int i=0; i < 30; i++) {
+ if(cache.size() == 0)
+ break;
+ Util.sleep(1000);
+ }
System.out.println("cache:\n" + cache);
size=cache.size();
assert size == 0 : "size is " + size;

0 comments on commit 5782d1d

Please sign in to comment.