Allow better debugging this test

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1372125 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Uwe Schindler 2012-08-12 15:10:56 +00:00
parent d1447b47f3
commit e2518705e8
1 changed files with 8 additions and 6 deletions

View File

@ -128,9 +128,10 @@ public class TestWeakIdentityMap extends LuceneTestCase {
assertNotNull(it.next());
c++;
}
assertTrue(size >= c);
assertTrue(c >= map.size());
size = map.size();
final int newSize = map.size();
assertTrue("previousSize("+size+")>=iteratorSize("+c+")", size >= c);
assertTrue("iteratorSize("+c+")>=newSize("+newSize+")", c >= newSize);
size = newSize;
} catch (InterruptedException ie) {}
map.clear();
@ -228,9 +229,10 @@ public class TestWeakIdentityMap extends LuceneTestCase {
assertNotNull(it.next());
c++;
}
assertTrue(size >= c);
assertTrue(c >= map.size());
size = map.size();
final int newSize = map.size();
assertTrue("previousSize("+size+")>=iteratorSize("+c+")", size >= c);
assertTrue("iteratorSize("+c+")>=newSize("+newSize+")", c >= newSize);
size = newSize;
} catch (InterruptedException ie) {}
}