Skip to content

Commit

Permalink
kie-issues#622: explicitly provide startupTimeout in waitingFor call
Browse files Browse the repository at this point in the history
  • Loading branch information
jstastny-cz authored and jstastny-cz committed Oct 9, 2023
1 parent fa38f9f commit 3eae2d6
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public KogitoKafkaContainer() {
withExposedPorts(KAFKA_PORT);
withCreateContainerCmdModifier(cmd -> cmd.withEntrypoint("sh"));
withCommand("-c", "while [ ! -f " + STARTER_SCRIPT + " ]; do sleep 0.1; done; " + STARTER_SCRIPT);
waitingFor(Wait.forLogMessage(".*Started Kafka API server.*", 1));
waitingFor(Wait.forLogMessage(".*Started Kafka API server.*", 1).withStartupTimeout(Constants.CONTAINER_START_TIMEOUT));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public KogitoKeycloakContainer() {
withEnv("KEYCLOAK_ADMIN", USER);
withEnv("KEYCLOAK_ADMIN_PASSWORD", PASSWORD);
withClasspathResourceMapping("testcontainers/keycloak/kogito-realm.json", REALM_FILE, BindMode.READ_ONLY);
waitingFor(Wait.forLogMessage(".*Keycloak.*started.*", 1));
waitingFor(Wait.forLogMessage(".*Keycloak.*started.*", 1).withStartupTimeout(Constants.CONTAINER_START_TIMEOUT));
withCommand("start-dev --import-realm");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class KogitoRedisSearchContainer extends KogitoGenericContainer<KogitoRed
public KogitoRedisSearchContainer() {
super(NAME);
addExposedPort(PORT);
waitingFor(Wait.forLogMessage(".*Ready to accept connections.*\\s", 1));
waitingFor(Wait.forLogMessage(".*Ready to accept connections.*\\s", 1).withStartupTimeout(Constants.CONTAINER_START_TIMEOUT));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
*/
package org.kie.kogito.quarkus.workflow.deployment.devservices;

import java.time.Duration;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.testcontainers.containers.GenericContainer;
Expand Down Expand Up @@ -60,7 +62,7 @@ public DataIndexInMemoryContainer(DockerImageName dockerImageName, int fixedExpo
withEnv("KOGITO_DATA_INDEX_VERTX_GRAPHQL_UI_PATH", "/q/graphql-ui");
withEnv("KOGITO_DATA_INDEX_QUARKUS_PROFILE", "http-events-support");
withExposedPorts(PORT);
waitingFor(Wait.forHttp("/q/health/ready").forStatusCode(200));
waitingFor(Wait.forHttp("/q/health/ready").forStatusCode(200).withStartupTimeout(Duration.ofMinutes(5)));
}

@Override
Expand Down

0 comments on commit 3eae2d6

Please sign in to comment.