Skip to content

Commit 61ff5f8

Browse files
authoredApr 18, 2024
Fix flakiness in testDontAllowSwitchingCompatibilityModeForClusterWithMultipleVersions (opensearch-project#13281)
Signed-off-by: Lakshya Taragi <lakshya.taragi@gmail.com>
1 parent 84679de commit 61ff5f8

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed
 

‎server/src/test/java/org/opensearch/action/support/clustermanager/TransportClusterManagerNodeActionTests.java

+2-5
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,6 @@
9191
import static org.opensearch.node.remotestore.RemoteStoreNodeService.REMOTE_STORE_COMPATIBILITY_MODE_SETTING;
9292
import static org.opensearch.test.ClusterServiceUtils.createClusterService;
9393
import static org.opensearch.test.ClusterServiceUtils.setState;
94-
import static org.opensearch.test.VersionUtils.randomCompatibleVersion;
95-
import static org.opensearch.test.VersionUtils.randomOpenSearchVersion;
9694
import static org.hamcrest.Matchers.containsString;
9795
import static org.hamcrest.Matchers.equalTo;
9896
import static org.hamcrest.Matchers.instanceOf;
@@ -826,10 +824,9 @@ public void testDontAllowSwitchingCompatibilityModeForClusterWithMultipleVersion
826824
request.persistentSettings(intendedCompatibilityModeSettings);
827825

828826
// two different but compatible open search versions for the discovery nodes
829-
final Version version1 = randomOpenSearchVersion(random());
830-
final Version version2 = randomCompatibleVersion(random(), version1);
827+
final Version version1 = Version.V_2_13_0;
828+
final Version version2 = Version.V_2_13_1;
831829

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

0 commit comments

Comments
 (0)