Skip to content

Commit b13e7d8

Browse files
committed
Specify the default tag for PostgreSQL container
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.
1 parent 9548efb commit b13e7d8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/test/java/org/apache/ibatis/testcontainers/PgContainer.java

+4-2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
import org.apache.ibatis.datasource.unpooled.UnpooledDataSource;
2121
import org.testcontainers.containers.PostgreSQLContainer;
22+
import org.testcontainers.utility.DockerImageName;
2223

2324
public final class PgContainer {
2425

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

3233
private static PostgreSQLContainer<?> initContainer() {
3334
@SuppressWarnings("resource")
34-
PostgreSQLContainer<?> container = new PostgreSQLContainer<>("postgres").withDatabaseName(DB_NAME)
35-
.withUsername(USERNAME).withPassword(PASSWORD);
35+
PostgreSQLContainer<?> container = new PostgreSQLContainer<>(
36+
DockerImageName.parse("postgres").withTag(PostgreSQLContainer.DEFAULT_TAG)).withDatabaseName(DB_NAME)
37+
.withUsername(USERNAME).withPassword(PASSWORD);
3638
container.start();
3739
return container;
3840
}

0 commit comments

Comments
 (0)