Skip to content

Commit

Permalink
chore: adding extra timeout for oracle
Browse files Browse the repository at this point in the history
  • Loading branch information
paulushcgcj committed Oct 25, 2024
1 parent 9e8f785 commit 2915062
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,7 @@ public abstract class AbstractTestContainerIntegrationTest {
.withDatabaseName("silva")
.withUsername("silva")
.withPassword(UUID.randomUUID().toString());
oracle = new OracleContainer("gvenzl/oracle-free:23.5-slim-faststart")
.withUsername("THE")
.withPassword(UUID.randomUUID().toString());
oracle = new CustomOracleContainer();

postgres.start();
oracle.start();
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package ca.bc.gov.restapi.results.extensions;

import java.time.Duration;
import java.util.UUID;
import org.testcontainers.oracle.OracleContainer;
import org.testcontainers.utility.DockerImageName;

public class CustomOracleContainer extends OracleContainer {

public CustomOracleContainer() {
super(
DockerImageName
.parse("gvenzl/oracle-free:23.5-slim-faststart")
);

this.withDatabaseName("legacyfsa")
.withUsername("THE")
.withPassword(UUID.randomUUID().toString().substring(24));
}

@Override
protected void waitUntilContainerStarted() {
getWaitStrategy()
.withStartupTimeout(Duration.ofMinutes(10))
.waitUntilReady(this);
}

}

0 comments on commit 2915062

Please sign in to comment.