mirror of https://github.com/apache/lucene.git
LUCENE-6096: Relax assertion about memory usage since memory usage depends on the JVM impl and settings.
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1644594 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
e9366323e8
commit
16337aba86
|
@ -57,7 +57,12 @@ public class TestLRUFilterCache extends LuceneTestCase {
|
|||
};
|
||||
|
||||
public void testFilterRamBytesUsed() {
|
||||
assertEquals(LRUFilterCache.FILTER_DEFAULT_RAM_BYTES_USED, RamUsageTester.sizeOf(new QueryWrapperFilter(new TermQuery(new Term("some_field", "some_term")))));
|
||||
final Filter simpleFilter = new QueryWrapperFilter(new TermQuery(new Term("some_field", "some_term")));
|
||||
final long actualRamBytesUsed = RamUsageTester.sizeOf(simpleFilter);
|
||||
final long ramBytesUsed = LRUFilterCache.FILTER_DEFAULT_RAM_BYTES_USED;
|
||||
// we cannot assert exactly that the constant is correct since actual
|
||||
// memory usage depends on JVM implementations and settings (eg. UseCompressedOops)
|
||||
assertEquals(actualRamBytesUsed, ramBytesUsed, actualRamBytesUsed / 2);
|
||||
}
|
||||
|
||||
public void testConcurrency() throws Throwable {
|
||||
|
|
Loading…
Reference in New Issue