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 committed Oct 24, 2023
1 parent fbcaedc commit 294cf71
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 @@ -44,7 +44,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 @@ -40,7 +40,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 @@ -26,7 +26,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 @@ -16,6 +16,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 @@ -58,7 +60,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 294cf71

Please sign in to comment.