From afec0fd6c9fc3edc085a6d21da5cc0b0d534ceff Mon Sep 17 00:00:00 2001 From: David Kyle Date: Wed, 15 Nov 2017 09:45:57 +0000 Subject: [PATCH] [ML] [DOCS] Clean up ML jobs after each docs test (elastic/x-pack-elasticsearch#2825) Original commit: elastic/x-pack-elasticsearch@5ec4a4a75206672ca23eff7504c3a25bb3381bc6 --- docs/build.gradle | 1 + .../elasticsearch/smoketest/XDocsClientYamlTestSuiteIT.java | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/docs/build.gradle b/docs/build.gradle index 0ff70341a3e..85e52d94a7d 100644 --- a/docs/build.gradle +++ b/docs/build.gradle @@ -97,6 +97,7 @@ buildRestTests.expectedUnconvertedCandidates = [ dependencies { testCompile project(path: ':x-pack-elasticsearch:plugin', configuration: 'runtime') + testCompile project(path: ':x-pack-elasticsearch:plugin', configuration: 'testArtifacts') } Closure waitWithAuth = { NodeInfo node, AntBuilder ant -> diff --git a/docs/src/test/java/org/elasticsearch/smoketest/XDocsClientYamlTestSuiteIT.java b/docs/src/test/java/org/elasticsearch/smoketest/XDocsClientYamlTestSuiteIT.java index 1df2639eca4..0adff1f9e27 100644 --- a/docs/src/test/java/org/elasticsearch/smoketest/XDocsClientYamlTestSuiteIT.java +++ b/docs/src/test/java/org/elasticsearch/smoketest/XDocsClientYamlTestSuiteIT.java @@ -19,6 +19,7 @@ import org.elasticsearch.test.rest.yaml.ClientYamlTestClient; import org.elasticsearch.test.rest.yaml.ClientYamlTestResponse; import org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase; import org.elasticsearch.test.rest.yaml.restspec.ClientYamlSuiteRestSpec; +import org.elasticsearch.xpack.ml.integration.MlRestTestStateCleaner; import org.junit.After; import java.io.IOException; @@ -116,4 +117,9 @@ public class XDocsClientYamlTestSuiteIT extends ESClientYamlSuiteTestCase { } } } + + @After + public void cleanMlState() { + new MlRestTestStateCleaner(logger, adminClient(), this); + } }