@@ -1378,11 +1378,13 @@ public void testPeerRecoveryRetentionLeases() throws IOException {
13781378 */
13791379 public void testOperationBasedRecovery () throws Exception {
13801380 if (isRunningAgainstOldCluster ()) {
1381- createIndex ( index , Settings .builder ()
1381+ final Settings . Builder settings = Settings .builder ()
13821382 .put (IndexMetaData .SETTING_NUMBER_OF_SHARDS , 1 )
1383- .put (IndexMetaData .SETTING_NUMBER_OF_REPLICAS , 1 )
1384- .put (IndexSettings .INDEX_SOFT_DELETES_SETTING .getKey (), randomBoolean ())
1385- .build ());
1383+ .put (IndexMetaData .SETTING_NUMBER_OF_REPLICAS , 1 );
1384+ if (getOldClusterVersion ().onOrAfter (Version .V_6_7_0 )) {
1385+ settings .put (IndexSettings .INDEX_SOFT_DELETES_SETTING .getKey (), randomBoolean ());
1386+ }
1387+ createIndex (index , settings .build ());
13861388 ensureGreen (index );
13871389 int committedDocs = randomIntBetween (100 , 200 );
13881390 for (int i = 0 ; i < committedDocs ; i ++) {
@@ -1409,6 +1411,7 @@ public void testOperationBasedRecovery() throws Exception {
14091411 * Verifies that once all shard copies on the new version, we should turn off the translog retention for indices with soft-deletes.
14101412 */
14111413 public void testTurnOffTranslogRetentionAfterUpgraded () throws Exception {
1414+ assumeTrue ("requires soft-deletes and retention leases" , getOldClusterVersion ().onOrAfter (Version .V_6_7_0 ));
14121415 if (isRunningAgainstOldCluster ()) {
14131416 createIndex (index , Settings .builder ()
14141417 .put (IndexMetaData .INDEX_NUMBER_OF_SHARDS_SETTING .getKey (), 1 )
0 commit comments