Skip to content

Commit

Permalink
feat(tests): Increase startup timeout to 5mins because of frequent ti…
Browse files Browse the repository at this point in the history
…meouts in Github checks
  • Loading branch information
martinfkaeser committed Aug 24, 2023
1 parent 8a55e2e commit 6057657
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class BpdmGateContextInitializer : ApplicationContextInitializer<ConfigurableApp
private val logger = KotlinLogging.logger { }

companion object {
const val GATE_CONTAINER_STARTUP_TIMEOUT_SEC = 180L
const val GATE_CONTAINER_STARTUP_TIMEOUT_SEC = 300L
const val BPDM_PORT = 8081
const val DEBUG_PORT = 8051
const val IMAGE = "maven-gate"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class BpdmPoolContextInitializer : ApplicationContextInitializer<ConfigurableApp
private val logger = KotlinLogging.logger { }

companion object {
const val POOL_CONTAINER_STARTUP_TIMEOUT_SEC = 180L
const val POOL_CONTAINER_STARTUP_TIMEOUT_SEC = 300L
const val BPDM_PORT = 8080
const val DEBUG_PORT = 8050
const val IMAGE = "maven-pool"
Expand All @@ -55,7 +55,6 @@ class BpdmPoolContextInitializer : ApplicationContextInitializer<ConfigurableApp
"JAVA_OPTIONS",
"-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=0.0.0.0:$DEBUG_PORT"
)
.withStartupTimeout(Duration.ofSeconds(210))
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,15 @@ import java.time.Duration

class OpenSearchContextInitializer : ApplicationContextInitializer<ConfigurableApplicationContext> {
companion object {
const val OPENSEARCH_CONTAINER_STARTUP_TIMEOUT_SEC = 270L
const val OPENSEARCH_PORT = 9200

val openSearchContainer: GenericContainer<*> = GenericContainer("opensearchproject/opensearch:2.1.0")
.withExposedPorts(OPENSEARCH_PORT)
.waitingFor(HttpWaitStrategy()
.forPort(OPENSEARCH_PORT)
.forStatusCodeMatching { response -> response == 200 || response == 401 }
.withStartupTimeout(Duration.ofSeconds(180))
.withStartupTimeout(Duration.ofSeconds(OPENSEARCH_CONTAINER_STARTUP_TIMEOUT_SEC))
)
// based on sample docker-compose for development from https://opensearch.org/docs/latest/opensearch/install/docker
.withEnv("cluster.name", "cdqbridge")
Expand Down

0 comments on commit 6057657

Please sign in to comment.