Skip to content

Commit 8c1a535

Browse files
committed
Fix range of version number generation in test (elastic#56849)
The version number componenent can't equal or exceed the revision multiplier. This fixes a the VersionTests unit test. (cherry picked from commit 7d2331a)
1 parent 38f8123 commit 8c1a535

File tree

1 file changed

+1
-1
lines changed
  • x-pack/plugin/sql/sql-client/src/test/java/org/elasticsearch/xpack/sql/client

1 file changed

+1
-1
lines changed

x-pack/plugin/sql/sql-client/src/test/java/org/elasticsearch/xpack/sql/client/VersionTests.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ private static String versionString(byte[] parts) {
4646
private static byte[] randomVersion() {
4747
byte[] parts = new byte[3];
4848
for (int i = 0; i < parts.length; i ++) {
49-
parts[i] = (byte) randomIntBetween(0, SqlVersion.REVISION_MULTIPLIER);
49+
parts[i] = (byte) randomIntBetween(0, SqlVersion.REVISION_MULTIPLIER - 1);
5050
}
5151
return parts;
5252
}

0 commit comments

Comments
 (0)