Skip to content
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

kie-issues#622: explicitly provide startupTimeout in waitingFor call #3259

Merged
merged 2 commits into from
Oct 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions .ci/jenkins/Jenkinsfile.pr.1.40.x
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
@Library('jenkins-pipeline-shared-libraries')_

pr_check_script = null

pipeline {
agent {
label 'ubuntu'
}
options {
timestamps()
timeout(time: 480, unit: 'MINUTES')
disableConcurrentBuilds(abortPrevious: true)
}
environment {
BUILDCHAIN_PROJECT = 'apache/incubator-kie-kogito-runtimes'

ENABLE_SONARCLOUD = 'false'
KOGITO_RUNTIMES_BUILD_MVN_OPTS = '-Dvalidate-formatting -Prun-code-coverage'
}
stages {
stage('Initialize') {
steps {
script {
// load `pr_check.groovy` file from kogito-pipelines:main
dir('kogito-pipelines') {
checkout(githubscm.resolveRepository('incubator-kie-kogito-pipelines', 'apache', 'main', false, 'ASF_Cloudbees_Jenkins_ci-builds'))
pr_check_script = load 'dsl/scripts/pr_check.groovy'
}
}
}
}
stage('PR check') {
steps {
script {
dir('kogito-pipelines') {
pr_check_script.launch()
}
}
}
}
}
post {
cleanup {
cleanWs()
}
}
}
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