Ideally, we would be able to run each yaml test with a different cluster setup, but that's currently limited by only supporting a single yaml test suite client. @mark-vieira suggested we may able to support multiple clients that have a method to filter which yaml tests are run. This would also be great for running the same tests under different cluster conditions (single node vs multi node, etc).
test/yaml-rest-runner/src/main/java/org/elasticsearch/test/rest/yaml/ESClientYamlSuiteTestCase.java
throw new RuntimeException(errorMessage(executableSection, e), e);
            }
        }
    }
    private String errorMessage(ExecutableSection executableSection, Throwable t) {
        return "Failure at [" + testCandidate.getSuitePath() + ":" + executableSection.getLocation().lineNumber() + "]: " + t.getMessage();
    }
    protected boolean randomizeContentType() {
        return true;
    }
    /**
     * Sniff the cluster for host metadata and return a
     * {@link RestClientBuilder} for a client with that metadata.
     */
    protected final RestClientBuilder getClientBuilderWithSniffedHosts() throws IOException {
        ElasticsearchNodesSniffer.Scheme scheme = ElasticsearchNodesSniffer.Scheme.valueOf(getProtocol().toUpperCase(Locale.ROOT));
        ElasticsearchNodesSniffer sniffer = new ElasticsearchNodesSniffer(
            adminClient(),
            ElasticsearchNodesSniffer.DEFAULT_SNIFF_REQUEST_TIMEOUT,
            scheme
        );
        RestClientBuilder builder = RestClient.builder(sniffer.sniff().toArray(new Node[0]));
        configureClient(builder, restClientSettings());
        return builder;
    }
    public ClientYamlTestCandidate getTestCandidate() {
        return testCandidate;
    }
}