Skip to content

Commit

Permalink
Merge pull request #332 from C0urante/bump-container-startup-timeout
Browse files Browse the repository at this point in the history
chore: bump integration test container startup timeout
  • Loading branch information
eliax1996 authored Jun 4, 2024
2 parents 1a05381 + f18fe5b commit 7ad3001
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.time.Duration;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
Expand Down Expand Up @@ -47,6 +48,7 @@
public abstract class AbstractIT {

private static final Logger LOGGER = LoggerFactory.getLogger(AbstractIT.class);
protected static final Duration CONTAINER_STARTUP_TIMEOUT = Duration.ofMinutes(5);
protected static final String TEST_TOPIC_NAME = "test_topic";
private static final String DEFAULT_KAFKA_TAG = "5.4.3";
private static final DockerImageName DEFAULT_IMAGE_NAME =
Expand All @@ -57,11 +59,13 @@ public abstract class AbstractIT {
@Container
protected KafkaContainer kafkaContainer = new KafkaContainer(DEFAULT_IMAGE_NAME)
.withNetwork(Network.newNetwork())
.withEnv("KAFKA_AUTO_CREATE_TOPICS_ENABLE", "false");
.withEnv("KAFKA_AUTO_CREATE_TOPICS_ENABLE", "false")
.withStartupTimeout(CONTAINER_STARTUP_TIMEOUT);

@Container
protected SchemaRegistryContainer schemaRegistryContainer =
new SchemaRegistryContainer(kafkaContainer);
new SchemaRegistryContainer(kafkaContainer)
.withStartupTimeout(CONTAINER_STARTUP_TIMEOUT);

protected ConnectRunner connectRunner;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ public class AbstractPostgresIT extends AbstractIT {
.withTag(DEFAULT_POSTGRES_TAG);

@Container
protected final PostgreSQLContainer<?> postgreSqlContainer = new PostgreSQLContainer<>(DEFAULT_POSTGRES_IMAGE_NAME);
protected final PostgreSQLContainer<?> postgreSqlContainer = new PostgreSQLContainer<>(DEFAULT_POSTGRES_IMAGE_NAME)
.withStartupTimeout(CONTAINER_STARTUP_TIMEOUT);

protected void executeUpdate(final String updateStatement) throws SQLException {
try (final Connection connection = getDatasource().getConnection();
Expand Down

0 comments on commit 7ad3001

Please sign in to comment.