[TEST] assign blacklistPathMatchers only after the contexts have been assigned
There could be an issue creating the REST clients and/or making the first request to the external cluster. If that happens, the blacklist has already been assigned and the following tests will fail because of an assertion that checks that the blacklist is not already assigned when the contexts are not.
This commit is contained in:
parent
a773d46c69
commit
71d6a37032
|
@ -112,11 +112,6 @@ public abstract class ESClientYamlSuiteTestCase extends ESRestTestCase {
|
|||
if (restTestExecutionContext == null) {
|
||||
assert adminExecutionContext == null;
|
||||
assert blacklistPathMatchers == null;
|
||||
String[] blacklist = resolvePathsProperty(REST_TESTS_BLACKLIST, null);
|
||||
blacklistPathMatchers = new ArrayList<>();
|
||||
for (String entry : blacklist) {
|
||||
blacklistPathMatchers.add(new BlacklistedPathPatternMatcher(entry));
|
||||
}
|
||||
String[] specPaths = resolvePathsProperty(REST_TESTS_SPEC, DEFAULT_SPEC_PATH);
|
||||
ClientYamlSuiteRestSpec restSpec = null;
|
||||
FileSystem fileSystem = getFileSystem();
|
||||
|
@ -149,6 +144,11 @@ public abstract class ESClientYamlSuiteTestCase extends ESRestTestCase {
|
|||
ClientYamlTestClient clientYamlTestClient = new ClientYamlTestClient(restSpec, restClient, hosts, esVersion);
|
||||
restTestExecutionContext = new ClientYamlTestExecutionContext(clientYamlTestClient);
|
||||
adminExecutionContext = new ClientYamlTestExecutionContext(clientYamlTestClient);
|
||||
String[] blacklist = resolvePathsProperty(REST_TESTS_BLACKLIST, null);
|
||||
blacklistPathMatchers = new ArrayList<>();
|
||||
for (String entry : blacklist) {
|
||||
blacklistPathMatchers.add(new BlacklistedPathPatternMatcher(entry));
|
||||
}
|
||||
}
|
||||
assert restTestExecutionContext != null;
|
||||
assert adminExecutionContext != null;
|
||||
|
|
Loading…
Reference in New Issue