File tree 2 files changed +9
-9
lines changed
spring-integration-debezium/src/test/java/org/springframework/integration/debezium
2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -589,6 +589,7 @@ project('spring-integration-debezium') {
589
589
}
590
590
591
591
testImplementation " io.debezium:debezium-connector-mysql:$debeziumVersion "
592
+ testImplementation ' org.testcontainers:mysql'
592
593
}
593
594
}
594
595
Original file line number Diff line number Diff line change 20
20
import java .util .UUID ;
21
21
22
22
import org .junit .jupiter .api .BeforeAll ;
23
- import org .testcontainers .containers .GenericContainer ;
24
- import org .testcontainers .containers .wait .strategy .LogMessageWaitStrategy ;
23
+ import org .testcontainers .containers .MySQLContainer ;
25
24
import org .testcontainers .junit .jupiter .Testcontainers ;
25
+ import org .testcontainers .utility .DockerImageName ;
26
26
27
27
/**
28
28
* @author Christian Tzolov
@@ -35,13 +35,12 @@ public interface DebeziumMySqlTestContainer {
35
35
36
36
int EXPECTED_DB_TX_COUNT = 52 ;
37
37
38
- GenericContainer <?> DEBEZIUM_MYSQL =
39
- new GenericContainer <>("debezium/example-mysql:2.2.0.Final" )
40
- .withExposedPorts (3306 )
41
- .withEnv ("MYSQL_ROOT_PASSWORD" , "debezium" )
42
- .withEnv ("MYSQL_USER" , "mysqluser" )
43
- .withEnv ("MYSQL_PASSWORD" , "mysqlpw" )
44
- .waitingFor (new LogMessageWaitStrategy ().withRegEx (".*port: 3306 MySQL Community Server - GPL.*." ));
38
+ MySQLContainer <?> DEBEZIUM_MYSQL =
39
+ new MySQLContainer <>(
40
+ DockerImageName .parse ("debezium/example-mysql:2.2.0.Final" )
41
+ .asCompatibleSubstituteFor ("mysql" ))
42
+ .withUsername ("mysqluser" )
43
+ .withPassword ("mysqlpw" );
45
44
46
45
@ BeforeAll
47
46
static void startContainer () {
You can’t perform that action at this time.
0 commit comments