-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature]: Expose class's fetch containerInfo timeout to user. #6128
Comments
Hi @kiview , Can you give me some advices? I'm waiting for your reply. Thank you~ |
@GOODBOY008 Can you please elaborate on your use case? This code is about container creation, it is independent of the ports becoming available (we have other code that checks for this condition). Even heavy containers will have the actual container normally created in sub-seconds. If you have a specific setup that is failing, sharing a reproducer would help: |
@kiview Thanks for your reply , I have create a repo to reproduce my sceno. https://github.com/GOODBOY008/testcontainer-issue/tree/issue-6128 . |
Hi @GOODBOY008! thanks for sharing! the issue is related to the private Network network = Network.newNetwork();
@Test
public void demonstration() {
try (
GenericContainer<?> OB_SERVER =
new GenericContainer<>("oceanbase/oceanbase-ce:3.1.4")
.withNetwork(network)
.withExposedPorts(OB_SERVER_SQL_PORT, OB_SERVER_RPC_PORT)
.withEnv("OB_ROOT_PASSWORD", OB_SYS_PASSWORD)
.waitingFor(Wait.forLogMessage(".*boot success!.*", 1))
.withLogConsumer(new Slf4jLogConsumer(LOG));
GenericContainer<?> LOG_PROXY =
new GenericContainer<>("whhe/oblogproxy:1.0.3")
.withNetwork(network)
.withExposedPorts(LOG_PROXY_PORT)
.withEnv("OB_SYS_USERNAME", OB_SYS_USERNAME)
.withEnv("OB_SYS_PASSWORD", OB_SYS_PASSWORD)
.waitingFor(Wait.forLogMessage(".*boot success!.*", 1))
.withLogConsumer(new Slf4jLogConsumer(LOG));
) {
Startables.deepStart(Stream.of(OB_SERVER, LOG_PROXY)).join();
}
} and it worked. is it helps? Otherwise, I think you can follow #5151 due to this is duplicated. |
@eddumelendez Thanks , it's worked. |
Module
Core
Problem
Some conditions container will excute long time to expose ports , but currently only wait 5 seconds to fetch containerInfo.
Solution
Expose class's fetch containerInfo timeout to user and with defalt value.
Benefit
We can wait more time for heavy container to started.
Alternatives
None.
Would you like to help contributing this feature?
Yes
The text was updated successfully, but these errors were encountered: