Skip to content

Commit

Permalink
Fix flakiness in testDontAllowSwitchingCompatibilityModeForClusterWit…
Browse files Browse the repository at this point in the history
…hMultipleVersions (#13281) (#13287)

(cherry picked from commit 61ff5f8)

Signed-off-by: Lakshya Taragi <lakshya.taragi@gmail.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
1 parent 77b6f07 commit 3c1a0ea
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,6 @@
import static org.opensearch.node.remotestore.RemoteStoreNodeService.REMOTE_STORE_COMPATIBILITY_MODE_SETTING;
import static org.opensearch.test.ClusterServiceUtils.createClusterService;
import static org.opensearch.test.ClusterServiceUtils.setState;
import static org.opensearch.test.VersionUtils.randomCompatibleVersion;
import static org.opensearch.test.VersionUtils.randomOpenSearchVersion;
import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.instanceOf;
Expand Down Expand Up @@ -826,10 +824,9 @@ public void testDontAllowSwitchingCompatibilityModeForClusterWithMultipleVersion
request.persistentSettings(intendedCompatibilityModeSettings);

// two different but compatible open search versions for the discovery nodes
final Version version1 = randomOpenSearchVersion(random());
final Version version2 = randomCompatibleVersion(random(), version1);
final Version version1 = Version.V_2_13_0;
final Version version2 = Version.V_2_13_1;

assert version1.equals(version2) == false : "current nodes in the cluster must be of different versions";
DiscoveryNode discoveryNode1 = new DiscoveryNode(
UUIDs.base64UUID(),
buildNewFakeTransportAddress(),
Expand Down

0 comments on commit 3c1a0ea

Please sign in to comment.