[ML] Adjust migration full cluster restart tests based on old cluster version #37118

This commit is contained in:
David Kyle 2019-01-03 17:15:35 +00:00 committed by GitHub
parent 13649aa70a
commit fc49d88b92
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -69,7 +69,6 @@ public class MlMigrationFullClusterRestartIT extends AbstractFullClusterRestartT
client().performRequest(createTestIndex);
}
@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/36816")
public void testMigration() throws Exception {
if (isRunningAgainstOldCluster()) {
createTestIndex();
@ -157,6 +156,12 @@ public class MlMigrationFullClusterRestartIT extends AbstractFullClusterRestartT
@SuppressWarnings("unchecked")
private void waitForMigration(List<String> expectedMigratedJobs, List<String> expectedMigratedDatafeeds,
List<String> unMigratedJobs, List<String> unMigratedDatafeeds) throws Exception {
// After v6.6.0 jobs are created in the index so no migration will take place
if (getOldClusterVersion().onOrAfter(Version.V_6_6_0)) {
return;
}
assertBusy(() -> {
// wait for the eligible configs to be moved from the clusterstate
Request getClusterState = new Request("GET", "/_cluster/state/metadata");