Skip to content

Commit

Permalink
set testContainer StartupTimeout
Browse files Browse the repository at this point in the history
  • Loading branch information
zhoukangcn committed Mar 14, 2024
1 parent 0deb7a7 commit 5ed0a7d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@ protected void withLogConsumer(Consumer<OutputFrame> logConsumer) {
container.withLogConsumer(logConsumer);
}

protected void withStartupTimeout(Duration duration) {
container.withStartupTimeout(duration);
}

// This method is used to get the expose port number of the container.
public Integer getMappedPort(int exposedPort) {
return container.getMappedPort(exposedPort);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.Statement;
import java.time.Duration;
import java.util.Map;
import java.util.Optional;
import java.util.Set;
Expand Down Expand Up @@ -48,6 +49,7 @@ protected DorisContainer(
protected void setupContainer() {
super.setupContainer();
withLogConsumer(new PrintingContainerLog(format("%-14s| ", "DorisContainer")));
withStartupTimeout(Duration.ofMinutes(5));
}

@Override
Expand Down

0 comments on commit 5ed0a7d

Please sign in to comment.