Permalink
Browse files

ns

  • Loading branch information...
1 parent 1bd0e70 commit b2031f841c5652d3ea9bf2b598fb51ab16ccd450 Bela Ban committed Oct 19, 2011
Showing with 9 additions and 4 deletions.
  1. +9 −4 tests/junit-functional/org/jgroups/tests/AgeOutCacheTest.java
@@ -57,14 +57,19 @@ public void testRemoveAndExpiration(TimeScheduler timer) {
cache.remove(5);
cache.remove(6); // not existent
+ boolean correct_size=false;
for(int i=0; i < 20; i++) {
- if(cache.size() == 3)
+ if(cache.size() == 3) {
+ correct_size=true;
break;
+ }
Util.sleep(500);
}
-
- System.out.println("cache:\n" + cache);
- assert cache.size() == 3 : "cache size should be 3 but is " + cache;
+
+ if(!correct_size) {
+ System.out.println("cache:\n" + cache);
+ assert cache.size() == 3 : "cache size should be 3 but is " + cache.size();
+ }
for(int i=0; i < 10; i++) {
if(cache.size() == 0)

0 comments on commit b2031f8

Please sign in to comment.