Skip to content

Commit c4b001b

Browse files
committed
Remove usage of deprecated APIs from testcontainers
1 parent b8a6a51 commit c4b001b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

spring-batch-core/src/test/java/org/springframework/batch/core/test/repository/MySQLJdbcJobRepositoryIntegrationTests.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
import org.junit.Test;
2828
import org.junit.runner.RunWith;
2929
import org.testcontainers.containers.MySQLContainer;
30+
import org.testcontainers.utility.DockerImageName;
3031

3132
import org.springframework.batch.core.Job;
3233
import org.springframework.batch.core.JobExecution;
@@ -57,8 +58,12 @@
5758
@ContextConfiguration
5859
public class MySQLJdbcJobRepositoryIntegrationTests {
5960

61+
// TODO find the best way to externalize and manage image versions
62+
// when implementing https://github.com/spring-projects/spring-batch/issues/3092
63+
private static final DockerImageName MYSQL_IMAGE = DockerImageName.parse("mysql:8.0.24");
64+
6065
@ClassRule
61-
public static MySQLContainer mysql = new MySQLContainer<>();
66+
public static MySQLContainer<?> mysql = new MySQLContainer<>(MYSQL_IMAGE);
6267

6368
@Autowired
6469
private DataSource dataSource;

0 commit comments

Comments
 (0)