Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ public class TestingDruidServer
private final GenericContainer<?> middleManager;
private final GenericContainer<?> zookeeper;
private final OkHttpClient httpClient;
private final Network network;

private static final int DRUID_COORDINATOR_PORT = 8081;
private static final int DRUID_BROKER_PORT = 8082;
Expand Down Expand Up @@ -85,7 +86,7 @@ public TestingDruidServer(String dockerImageName)
f.setReadable(true, false);
f.setExecutable(true, false);
this.httpClient = new OkHttpClient();
Network network = Network.newNetwork();
network = Network.newNetwork();
this.zookeeper = new GenericContainer<>("zookeeper")
.withNetwork(network)
.withNetworkAliases("zookeeper")
Expand Down Expand Up @@ -193,6 +194,7 @@ public void close()
closer.register(middleManager::stop);
closer.register(coordinator::stop);
closer.register(zookeeper::stop);
closer.register(network::close);
}
catch (FileSystemException e) {
// Unfortunately, on CI environment, the user running file deletion runs into
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,15 @@ public class TestElasticsearchBackpressure
{
private static final String image = "elasticsearch:7.0.0";

private Network network;
private ElasticsearchServer elasticsearch;
private ElasticsearchNginxProxy elasticsearchNginxProxy;

@Override
protected QueryRunner createQueryRunner()
throws Exception
{
Network network = Network.newNetwork();
network = Network.newNetwork();
elasticsearch = new ElasticsearchServer(network, image, ImmutableMap.of());
elasticsearchNginxProxy = new ElasticsearchNginxProxy(network, 1);

Expand All @@ -58,6 +59,7 @@ public final void destroy()
{
elasticsearchNginxProxy.stop();
elasticsearch.stop();
network.close();
}

@Test
Expand Down