Use compatible image version with Debezium

* Fix MongoDb driver problem.
Probably we need to think about upgrading Debezium support to the latest
version, so its MongoDb connector is based on the latest Mongo Driver
which already is pulled by Spring Boot
This commit is contained in:
Artem Bilan
2021-02-19 12:28:53 -05:00
parent 6d2ade2e7b
commit 386dad6562
3 changed files with 30 additions and 5 deletions

View File

@@ -92,6 +92,28 @@
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>mysql</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mongodb</groupId>
<artifactId>mongodb-driver</artifactId>
<version>3.12.7</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mongodb</groupId>
<artifactId>bson</artifactId>
<version>3.12.7</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mongodb</groupId>
<artifactId>mongodb-driver-core</artifactId>
<version>3.12.7</version>
<scope>test</scope>
</dependency>
</dependencies>

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2020-2020 the original author or authors.
* Copyright 2020-2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -38,8 +38,8 @@ import static org.springframework.cloud.stream.app.source.cdc.CdcTestUtils.recei
/**
* @author Christian Tzolov
* @author David Turanski
* @author Artem Bilan
*/
@Disabled("Run as needed if there is an issue with a specific connector")
public class CdcSourceDatabasesIntegrationTest {
private final SpringApplicationBuilder applicationBuilder = new SpringApplicationBuilder(
@@ -82,6 +82,7 @@ public class CdcSourceDatabasesIntegrationTest {
}
@Test
@Disabled
public void sqlServer() {
GenericContainer sqlServer = new GenericContainer(new ImageFromDockerfile()
.withFileFromClasspath("Dockerfile", "sqlserver/Dockerfile")
@@ -140,9 +141,10 @@ public class CdcSourceDatabasesIntegrationTest {
postgres.stop();
}
// @Test
@Test
@Disabled
public void mongodb() {
GenericContainer mongodb = new GenericContainer("debezium/example-mongodb:1.0")
GenericContainer mongodb = new GenericContainer("debezium/example-mongodb:1.3")
.withEnv("MONGODB_USER", "debezium")
.withEnv("MONGODB_PASSWORD", "dbz")
.withExposedPorts(27017);
@@ -163,4 +165,5 @@ public class CdcSourceDatabasesIntegrationTest {
}
mongodb.stop();
}
}

View File

@@ -47,7 +47,7 @@ public class CdcBootStarterIntegrationTest {
@Container
static GenericContainer debeziumMySQL =
new GenericContainer<>(DockerImageName.parse("debezium/example-mysql"))
new GenericContainer<>(DockerImageName.parse("debezium/example-mysql:1.3"))
.withEnv("MYSQL_ROOT_PASSWORD", "debezium")
.withEnv("MYSQL_USER", "mysqluser")
.withEnv("MYSQL_PASSWORD", "mysqlpw")