Upgrade Testcontainers, Debezium, and fix exceptions in MailSupplierTests
This commit is contained in:
@@ -18,6 +18,7 @@ package org.springframework.cloud.stream.app.source.cdc;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.testcontainers.containers.GenericContainer;
|
||||
@@ -39,6 +40,7 @@ import static org.springframework.cloud.stream.app.source.cdc.CdcTestUtils.recei
|
||||
* @author Christian Tzolov
|
||||
* @author David Turanski
|
||||
*/
|
||||
@Disabled("Run as needed if there is an issue with a specific connector")
|
||||
public class CdcSourceDatabasesIntegrationTest extends CdcTestSupport {
|
||||
|
||||
private final SpringApplicationBuilder applicationBuilder = new SpringApplicationBuilder(
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<description>Change Data Capture (CDC) Debezium Boot Starter</description>
|
||||
|
||||
<properties>
|
||||
<version.debezium>1.2.1.Final</version.debezium>
|
||||
<version.debezium>1.3.0.Final</version.debezium>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
||||
@@ -19,23 +19,27 @@ package org.springframework.cloud.fn.supplier.mail;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
import org.junit.jupiter.api.AfterAll;
|
||||
import org.junit.jupiter.api.AfterEach;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import reactor.core.publisher.Flux;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.integration.dsl.StandardIntegrationFlow;
|
||||
import org.springframework.integration.test.context.SpringIntegrationTest;
|
||||
import org.springframework.integration.test.mail.TestMailServer;
|
||||
import org.springframework.messaging.Message;
|
||||
import org.springframework.test.annotation.DirtiesContext;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.NONE,
|
||||
properties = {
|
||||
"mail.supplier.mark-as-read=true",
|
||||
"mail.supplier.delete=false",
|
||||
"mail.supplier.user-flag=testSIUserFlag",
|
||||
"mail.supplier.java-mail-properties=mail.imap.socketFactory.fallback=true\\n mail.store.protocol=imap\\n mail.debug=true"})
|
||||
@SpringIntegrationTest(noAutoStartup = "*")
|
||||
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.NONE, properties = {
|
||||
"mail.supplier.mark-as-read=true",
|
||||
"mail.supplier.delete=false",
|
||||
"mail.supplier.user-flag=testSIUserFlag",
|
||||
"mail.supplier.java-mail-properties=mail.imap.socketFactory.fallback=true\\n mail.store.protocol=imap\\n mail.debug=true" })
|
||||
@DirtiesContext
|
||||
public class AbstractMailSupplierTests {
|
||||
|
||||
@@ -44,6 +48,9 @@ public class AbstractMailSupplierTests {
|
||||
@Autowired
|
||||
protected Supplier<Flux<Message<?>>> mailSupplier;
|
||||
|
||||
@Autowired
|
||||
private StandardIntegrationFlow integrationFlow;
|
||||
|
||||
protected static void startMailServer(TestMailServer.MailServer mailServer)
|
||||
throws InterruptedException {
|
||||
MAIL_SERVER = mailServer;
|
||||
@@ -55,13 +62,21 @@ public class AbstractMailSupplierTests {
|
||||
assertThat(n < 100).isTrue();
|
||||
}
|
||||
|
||||
@BeforeEach
|
||||
void start() {
|
||||
integrationFlow.start();
|
||||
}
|
||||
|
||||
@AfterEach
|
||||
void stop() {
|
||||
integrationFlow.stop();
|
||||
}
|
||||
|
||||
@AfterAll
|
||||
public static void cleanup() {
|
||||
System.clearProperty("test.mail.server.port");
|
||||
MAIL_SERVER.stop();
|
||||
}
|
||||
|
||||
|
||||
@SpringBootApplication
|
||||
public static class MailSupplierTestApplication {
|
||||
|
||||
|
||||
@@ -44,8 +44,8 @@
|
||||
<spring-kafka.version>2.6.2</spring-kafka.version>
|
||||
<spring-rabbit.version>2.2.11.RELEASE</spring-rabbit.version>
|
||||
<spring-cloud-function.version>3.0.9.RELEASE</spring-cloud-function.version>
|
||||
<spring-integration-dependencies.version>5.3.3.BUILD-SNAPSHOT</spring-integration-dependencies.version>
|
||||
<test-containers.version>1.15.0-rc2</test-containers.version>
|
||||
<spring-integration-dependencies.version>5.3.3.RELEASE</spring-integration-dependencies.version>
|
||||
<test-containers.version>1.15.0</test-containers.version>
|
||||
<maven-flatten-plugin.version>1.2.5</maven-flatten-plugin.version>
|
||||
<maven-surefire-plugin.version>2.22.2</maven-surefire-plugin.version>
|
||||
</properties>
|
||||
|
||||
Reference in New Issue
Block a user