mirror of https://github.com/apache/lucene.git
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:
parent
3a594688a5
commit
6455445730
|
@ -141,4 +141,9 @@ public class OrdinalsCache {
|
||||||
}
|
}
|
||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Clears all entries from the cache. */
|
||||||
|
public synchronized static void clear() {
|
||||||
|
ordsCache.clear();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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();
|
||||||
|
|
Loading…
Reference in New Issue