mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-26 14:54:56 +00:00
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…
x
Reference in New Issue
Block a user