Fix ByteSizeValue serialisation test
This commit is contained in:
parent
d941c64edb
commit
c93cc1bb8f
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue