mirror of https://github.com/apache/lucene.git
print percentage correctly
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1603589 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
42aaf72f62
commit
1a92efa190
|
@ -226,7 +226,7 @@ abstract class BaseIndexFileFormatTestCase extends LuceneTestCase {
|
|||
final long expectedBytes = ((SegmentReader) r).ramBytesUsed();
|
||||
final long absoluteError = actualBytes - expectedBytes;
|
||||
final double relativeError = (double) absoluteError / actualBytes;
|
||||
final String message = "Actual RAM usage " + actualBytes + ", but got " + expectedBytes + ", " + relativeError + "% error";
|
||||
final String message = "Actual RAM usage " + actualBytes + ", but got " + expectedBytes + ", " + 100*relativeError + "% error";
|
||||
assertTrue(message, Math.abs(relativeError) < 0.20d || Math.abs(absoluteError) < 1000);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue