77package org .elasticsearch .upgrades ;
88
99import org .elasticsearch .ElasticsearchException ;
10+ import org .elasticsearch .Version ;
1011import org .elasticsearch .client .Request ;
1112import org .elasticsearch .client .RequestOptions ;
1213import org .elasticsearch .client .Response ;
@@ -74,6 +75,10 @@ public void testSnapshotUpgrader() throws Exception {
7475 case OLD -> createJobAndSnapshots ();
7576 case MIXED -> {
7677 assumeTrue ("We should only test if old cluster is before new cluster" , isOriginalClusterCurrent () == false );
78+ assumeTrue (
79+ "Older versions could not always reliably determine if we were in a mixed cluster state" ,
80+ Version .fromString (UPGRADE_FROM_VERSION ).onOrAfter (Version .V_9_3_0 )
81+ );
7782 ensureHealth ((request -> {
7883 request .addParameter ("timeout" , "70s" );
7984 request .addParameter ("wait_for_nodes" , "3" );
@@ -97,13 +102,6 @@ public void testSnapshotUpgrader() throws Exception {
97102
98103 @ SuppressWarnings ("unchecked" )
99104 private void testSnapshotUpgradeFailsOnMixedCluster () throws Exception {
100- // TODO the mixed cluster assertions sometimes fail because the code that
101- // detects the mixed cluster relies on the transport versions being different.
102- // This assumption does not hold immediately after a version bump and new
103- // branch being cut as the new branch will have the same transport version
104- // See https://github.com/elastic/elasticsearch/issues/98560
105-
106- assumeTrue ("The mixed cluster is not always detected correctly, see https://github.com/elastic/elasticsearch/issues/98560" , false );
107105 Map <String , Object > jobs = entityAsMap (getJob (JOB_ID ));
108106
109107 String currentSnapshot = ((List <String >) XContentMapValues .extractValue ("jobs.model_snapshot_id" , jobs )).get (0 );
0 commit comments