LUCENE-5303: clear cache before each test

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1535215 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael McCandless 2013-10-24 00:04:45 +00:00
parent 3a594688a5
commit 6455445730
2 changed files with 9 additions and 2 deletions

View File

@ -141,4 +141,9 @@ public class OrdinalsCache {
} }
return size; return size;
} }
/** Clears all entries from the cache. */
public synchronized static void clear() {
ordsCache.clear();
}
} }

View File

@ -73,6 +73,8 @@ public class OrdinalsCacheTest extends FacetTestCase {
}; };
} }
OrdinalsCache.clear();
long ramBytesUsed = 0; long ramBytesUsed = 0;
for (Thread t : threads) { for (Thread t : threads) {
t.start(); t.start();