Skip to content

Commit 870655e

Browse files
committed
add version guard for cleanup with nodes < 6.6
1 parent 5bc8f27 commit 870655e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

test/framework/src/main/java/org/elasticsearch/test/rest/ESRestTestCase.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,12 @@ private void wipeCluster() throws Exception {
410410
waitForPendingRollupTasks();
411411
}
412412

413-
if (hasXPack && false == preserveILMPoliciesUponCompletion()) {
413+
/*
414+
* ILM was introduced in 6.6 so any cluster that contains older
415+
* nodes won't be able to do *anything* with ILM, including cleanup.
416+
*/
417+
if (hasXPack && nodeVersions.first().onOrAfter(Version.V_6_6_0)
418+
&& false == preserveILMPoliciesUponCompletion()) {
414419
deleteAllPolicies();
415420
}
416421
}

0 commit comments

Comments
 (0)