diff --git a/qa/full-cluster-restart/src/test/java/org/elasticsearch/upgrades/FullClusterRestartIT.java b/qa/full-cluster-restart/src/test/java/org/elasticsearch/upgrades/FullClusterRestartIT.java index 74fcec24c85..cbd9b1e60e3 100644 --- a/qa/full-cluster-restart/src/test/java/org/elasticsearch/upgrades/FullClusterRestartIT.java +++ b/qa/full-cluster-restart/src/test/java/org/elasticsearch/upgrades/FullClusterRestartIT.java @@ -1496,7 +1496,7 @@ public class FullClusterRestartIT extends AbstractFullClusterRestartTestCase { // make sure .tasks index exists assertBusy(() -> { Request getTasksIndex = new Request("GET", "/.tasks"); - if (isRunningAgainstAncientCluster()) { + if (getOldClusterVersion().onOrAfter(Version.V_6_8_0) && getOldClusterVersion().before(Version.V_7_0_0)) { getTasksIndex.addParameter("include_type_name", "false"); } assertThat(client().performRequest(getTasksIndex).getStatusLine().getStatusCode(), is(200));