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

chore: bump integration test container startup timeout #332

Merged
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
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
Loading