From 1329c982c9395e61614a4ca63815c1ea5e4e3b91 Mon Sep 17 00:00:00 2001 From: Yang Wang Date: Wed, 5 Aug 2020 16:36:43 +1000 Subject: [PATCH] Ensure license is ready for xpack info doc tests (#60706) (#60708) Fix another variant of missing license test failure similar to the cases fixed by #60498. --- .../elasticsearch/smoketest/DocsClientYamlTestSuiteIT.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/src/test/java/org/elasticsearch/smoketest/DocsClientYamlTestSuiteIT.java b/docs/src/test/java/org/elasticsearch/smoketest/DocsClientYamlTestSuiteIT.java index 0773c5b7064..0850653cdb0 100644 --- a/docs/src/test/java/org/elasticsearch/smoketest/DocsClientYamlTestSuiteIT.java +++ b/docs/src/test/java/org/elasticsearch/smoketest/DocsClientYamlTestSuiteIT.java @@ -104,7 +104,7 @@ public class DocsClientYamlTestSuiteIT extends ESClientYamlSuiteTestCase { @Before public void waitForRequirements() throws Exception { - if (isCcrTest() || isGetLicenseTest()) { + if (isCcrTest() || isGetLicenseTest() || isXpackInfoTest()) { ESRestTestCase.waitForActiveLicense(adminClient()); } } @@ -180,6 +180,11 @@ public class DocsClientYamlTestSuiteIT extends ESClientYamlSuiteTestCase { return testName != null && (testName.contains("/get-license/") || testName.contains("\\get-license\\")); } + protected boolean isXpackInfoTest() { + String testName = getTestName(); + return testName != null && (testName.contains("/info/") || testName.contains("\\info\\")); + } + /** * Compares the results of running two analyzers against many random * strings. The goal is to figure out if two anlayzers are "the same" by