Skip to content

Commit

Permalink
Fix ByteSizeValue serialisation test
Browse files Browse the repository at this point in the history
  • Loading branch information
colings86 committed Dec 15, 2017
1 parent d941c64 commit c93cc1b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ protected ByteSizeValue createTestInstance() {
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);
Expand Down

0 comments on commit c93cc1b

Please sign in to comment.