Relax LiveVersionMapTests.testRamBytesUsed.

With Java9's new restrictions we cannot compute ram usage as accurately as
before. See https://issues.apache.org/jira/browse/LUCENE-7595.
This commit is contained in:
Adrien Grand 2017-01-05 11:31:18 +01:00
parent 0a6827a5cc
commit 97f3a9bd79
1 changed files with 2 additions and 2 deletions

View File

@ -36,8 +36,8 @@ public class LiveVersionMapTests extends ESTestCase {
}
long actualRamBytesUsed = RamUsageTester.sizeOf(map);
long estimatedRamBytesUsed = map.ramBytesUsed();
// less than 25% off
assertEquals(actualRamBytesUsed, estimatedRamBytesUsed, actualRamBytesUsed / 4);
// less than 50% off
assertEquals(actualRamBytesUsed, estimatedRamBytesUsed, actualRamBytesUsed / 2);
// now refresh
map.beforeRefresh();