Fix range of version number generation in test (#56849)

The version number componenent can't equal or exceed the revision
multiplier.
This fixes a the VersionTests unit test.

(cherry picked from commit 7d2331a2818ae20024c5c3617cd4433f90e9c098)
This commit is contained in:
Bogdan Pintea 2020-05-16 08:57:37 +02:00
parent 4d47d63f55
commit de7dd6154e
1 changed files with 1 additions and 1 deletions

View File

@ -46,7 +46,7 @@ public class VersionTests extends ESTestCase {
private static byte[] randomVersion() {
byte[] parts = new byte[3];
for (int i = 0; i < parts.length; i ++) {
parts[i] = (byte) randomIntBetween(0, SqlVersion.REVISION_MULTIPLIER);
parts[i] = (byte) randomIntBetween(0, SqlVersion.REVISION_MULTIPLIER - 1);
}
return parts;
}