Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
JNSimba committed Mar 11, 2024
1 parent a758cee commit 8bca31e
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,10 @@ protected static String getFenodes() {
return DORIS_CONTAINER.getHost() + ":8030";
}

@BeforeClass
static {
startContainers();
}

public static void startContainers() {
LOG.info("Starting doris containers...");
Startables.deepStart(Stream.of(DORIS_CONTAINER)).join();
Expand All @@ -84,23 +87,22 @@ public static void startContainers() {
LOG.info("Containers doris are started.");
}

@AfterClass
public static void stopContainers() {
LOG.info("Stopping doris containers...");
DORIS_CONTAINER.stop();
LOG.info("Containers doris are stopped.");
}

public static GenericContainer createDorisContainer() {
LOG.info("Create doris containers...");
GenericContainer container =
new GenericContainer<>(DORIS_DOCKER_IMAGE)
.withNetwork(Network.newNetwork())
.withNetworkAliases("DorisContainer")
.withPrivilegedMode(true)
.withLogConsumer(
new Slf4jLogConsumer(
DockerLoggerFactory.getLogger(DORIS_DOCKER_IMAGE)))
.withReuse(true);
DockerLoggerFactory.getLogger(DORIS_DOCKER_IMAGE)));

container.setPortBindings(
Lists.newArrayList(
Expand Down

0 comments on commit 8bca31e

Please sign in to comment.