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:
Robert Muir 2014-06-18 19:15:34 +00:00
parent 42aaf72f62
commit 1a92efa190
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}