File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
modules/elasticsearch/src
main/java/org/testcontainers/elasticsearch
test/java/org/testcontainers/elasticsearch Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 1313 * Represents an elasticsearch docker instance which exposes by default port 9200 and 9300 (transport.tcp.port)
1414 * The docker image is by default fetched from docker.elastic.co/elasticsearch/elasticsearch
1515 */
16- public class ElasticsearchContainer extends GenericContainer {
16+ public class ElasticsearchContainer extends GenericContainer < ElasticsearchContainer > {
1717
1818 /**
1919 * Elasticsearch Default HTTP port
Original file line number Diff line number Diff line change @@ -46,7 +46,9 @@ public void stopRestClient() throws IOException {
4646
4747 @ Test
4848 public void elasticsearchDefaultTest () throws IOException {
49- try (ElasticsearchContainer container = new ElasticsearchContainer ()){
49+ try (ElasticsearchContainer container = new ElasticsearchContainer ()
50+ .withEnv ("foo" , "bar" ) // dummy env for compiler checking correct generics usage
51+ ){
5052 container .start ();
5153 Response response = getClient (container ).performRequest (new Request ("GET" , "/" ));
5254 assertThat (response .getStatusLine ().getStatusCode (), is (200 ));
You can’t perform that action at this time.
0 commit comments