Fix ByteSizeValue serialisation test

This commit is contained in:
Colin Goodheart-Smithe 2017-12-15 12:09:59 +00:00
parent d941c64edb
commit c93cc1bb8f
No known key found for this signature in database
GPG Key ID: F975E7BDD739B3C7
1 changed files with 1 additions and 1 deletions

View File

@ -208,7 +208,7 @@ public class ByteSizeValueTests extends AbstractWireSerializingTestCase<ByteSize
if (randomBoolean()) {
ByteSizeUnit unit = randomFrom(ByteSizeUnit.values());
long size = randomNonNegativeLong() / unit.toBytes(1);
if (size >= Long.MAX_VALUE / unit.toBytes(1)) {
if (size > Long.MAX_VALUE / unit.toBytes(1)) {
throw new AssertionError();
}
return new ByteSizeValue(size, unit);