@Before public void reset() throws IOException, RestException { // skip test if it matches one of the blacklist globs for (PathMatcher blacklistedPathMatcher : blacklistPathMatchers) { // we need to replace a few characters otherwise the test section name can't be parsed as a // path on windows String testSection = testCandidate .getTestSection() .getName() .replace("*", "") .replace("\\", "/") .replaceAll("\\s+/", "/") .trim(); String testPath = testCandidate.getSuitePath() + "/" + testSection; assumeFalse( "[" + testCandidate.getTestPath() + "] skipped, reason: blacklisted", blacklistedPathMatcher.matches(Paths.get(testPath))); } // The client needs non static info to get initialized, therefore it can't be initialized in the // before class restTestExecutionContext.initClient(cluster().httpAddresses(), restClientSettings()); restTestExecutionContext.clear(); // skip test if the whole suite (yaml file) is disabled assumeFalse( buildSkipMessage( testCandidate.getSuitePath(), testCandidate.getSetupSection().getSkipSection()), testCandidate .getSetupSection() .getSkipSection() .skip(restTestExecutionContext.esVersion())); // skip test if test section is disabled assumeFalse( buildSkipMessage( testCandidate.getTestPath(), testCandidate.getTestSection().getSkipSection()), testCandidate.getTestSection().getSkipSection().skip(restTestExecutionContext.esVersion())); }