pull/14486/merge
Andy Wilkinson 6 years ago
parent 9201e23f67
commit c1b864c826

@ -22,6 +22,7 @@ import java.util.Map;
import org.elasticsearch.action.get.GetRequest; import org.elasticsearch.action.get.GetRequest;
import org.elasticsearch.action.index.IndexRequest; import org.elasticsearch.action.index.IndexRequest;
import org.elasticsearch.client.RequestOptions;
import org.elasticsearch.client.RestClient; import org.elasticsearch.client.RestClient;
import org.elasticsearch.client.RestHighLevelClient; import org.elasticsearch.client.RestHighLevelClient;
import org.junit.Test; import org.junit.Test;
@ -87,9 +88,10 @@ public class RestClientAutoConfigurationTests {
source.put("b", "bravo"); source.put("b", "bravo");
IndexRequest index = new IndexRequest("foo", "bar", "1") IndexRequest index = new IndexRequest("foo", "bar", "1")
.source(source); .source(source);
client.index(index); client.index(index, RequestOptions.DEFAULT);
GetRequest getRequest = new GetRequest("foo", "bar", "1"); GetRequest getRequest = new GetRequest("foo", "bar", "1");
assertThat(client.get(getRequest).isExists()).isTrue(); assertThat(client.get(getRequest, RequestOptions.DEFAULT).isExists())
.isTrue();
})); }));
} }

@ -39,8 +39,8 @@ public final class DetailedProgressReporterTests {
private static final String ARTIFACT = "org/alpha/bravo/charlie/1.2.3/charlie-1.2.3.jar"; private static final String ARTIFACT = "org/alpha/bravo/charlie/1.2.3/charlie-1.2.3.jar";
private final TransferResource resource = new TransferResource(REPOSITORY, ARTIFACT, private final TransferResource resource = new TransferResource(null, REPOSITORY,
null, null); ARTIFACT, null, null);
private final ByteArrayOutputStream baos = new ByteArrayOutputStream(); private final ByteArrayOutputStream baos = new ByteArrayOutputStream();

@ -119,6 +119,7 @@ class BootZipCopyAction implements CopyAction {
return () -> true; return () -> true;
} }
@SuppressWarnings("unchecked")
private Spec<FileTreeElement> createExclusionSpec( private Spec<FileTreeElement> createExclusionSpec(
Spec<FileTreeElement> loaderEntries) { Spec<FileTreeElement> loaderEntries) {
return Specs.union(loaderEntries, this.exclusions); return Specs.union(loaderEntries, this.exclusions);

@ -24,6 +24,7 @@ import org.junit.rules.TestRule;
import org.junit.runner.Description; import org.junit.runner.Description;
import org.junit.runners.model.Statement; import org.junit.runners.model.Statement;
import org.testcontainers.DockerClientFactory; import org.testcontainers.DockerClientFactory;
import org.testcontainers.containers.FailureDetectingExternalResource;
import org.testcontainers.containers.GenericContainer; import org.testcontainers.containers.GenericContainer;
/** /**
@ -68,7 +69,8 @@ class Container implements TestRule {
return new SkipStatement(); return new SkipStatement();
} }
this.container = this.containerFactory.get(); this.container = this.containerFactory.get();
return this.container.apply(base, description); return ((FailureDetectingExternalResource) this.container).apply(base,
description);
} }
public int getMappedPort() { public int getMappedPort() {

Loading…
Cancel
Save