Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ public class NodeMetadataTests extends OpenSearchTestCase {
private Version randomVersion() {
// VersionUtils.randomVersion() only returns known versions, which are necessarily no later than Version.CURRENT; however we want
// also to consider our behaviour with all versions, so occasionally pick up a truly random version.
return rarely() ? Version.fromId(randomInt()) : VersionUtils.randomVersion(random());
//
// Version.fromId(...) requires the OpenSearch mask to be present, so we must generate ids in the valid masked range.
// The maximum id used elsewhere in this test class is 234217727 (see tooNewVersion()).
return rarely() ? Version.fromId(between(MASK, 234217727)) : VersionUtils.randomVersion(random());
}

public void testEqualsHashcodeSerialization() {
Expand Down
Loading