Skip to content

Commit

Permalink
Specify the default tag for PostgreSQL container
Browse files Browse the repository at this point in the history
After the recent change 7a4167d , NetworkTimeoutTest fails consistently on my environment (Apple M3 MAX w/ Colima).
Assuming it is a temporary issue, I didn't look into it.
  • Loading branch information
harawata committed Jan 8, 2025
1 parent 9548efb commit b13e7d8
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

import org.apache.ibatis.datasource.unpooled.UnpooledDataSource;
import org.testcontainers.containers.PostgreSQLContainer;
import org.testcontainers.utility.DockerImageName;

public final class PgContainer {

Expand All @@ -31,8 +32,9 @@ public final class PgContainer {

private static PostgreSQLContainer<?> initContainer() {
@SuppressWarnings("resource")
PostgreSQLContainer<?> container = new PostgreSQLContainer<>("postgres").withDatabaseName(DB_NAME)
.withUsername(USERNAME).withPassword(PASSWORD);
PostgreSQLContainer<?> container = new PostgreSQLContainer<>(
DockerImageName.parse("postgres").withTag(PostgreSQLContainer.DEFAULT_TAG)).withDatabaseName(DB_NAME)
.withUsername(USERNAME).withPassword(PASSWORD);
container.start();
return container;
}
Expand Down

0 comments on commit b13e7d8

Please sign in to comment.