Upgrade Testcontainers tests to the latest images

* Un`@Disable` updated tests
This commit is contained in:
Artem Bilan
2021-02-11 16:21:06 -05:00
parent d3c38406e8
commit e2c11b4773
19 changed files with 74 additions and 72 deletions

View File

@@ -12,7 +12,7 @@ The **$$header-enricher$$** $$processor$$ has the following options:
//tag::configuration-properties[]
$$header.enricher.headers$$:: $$\n separated properties representing headers in which values are SpEL expressions, e.g foo='bar' \n baz=payload.baz.$$ *($$Properties$$, default: `$$<none>$$`)*
$$header.enricher.overwrite$$:: $$set to true to overwrite any existing message headers.$$ *($$Boolean$$, default: `$$false$$`)*
$$header.enricher.overwrite$$:: $$set to true to overwrite any existing message headers.$$ *($$Boolean$$, default: `$$<none>$$`)*
//end::configuration-properties[]
//end::ref-doc[]

View File

@@ -17,12 +17,12 @@ If the incoming type is `byte[]` and the content type is set to `text/plain` or
== Options
//tag::configuration-properties[]
$$splitter.apply-sequence$$:: $$Add correlation/sequence information in headers to facilitate later aggregation.$$ *($$Boolean$$, default: `$$true$$`)*
$$splitter.apply-sequence$$:: $$Add correlation/sequence information in headers to facilitate later aggregation.$$ *($$Boolean$$, default: `$$<none>$$`)*
$$splitter.charset$$:: $$The charset to use when converting bytes in text-based files to String.$$ *($$String$$, default: `$$<none>$$`)*
$$splitter.delimiters$$:: $$When expression is null, delimiters to use when tokenizing {@link String} payloads.$$ *($$String$$, default: `$$<none>$$`)*
$$splitter.expression$$:: $$A SpEL expression for splitting payloads.$$ *($$String$$, default: `$$<none>$$`)*
$$splitter.file-markers$$:: $$Set to true or false to use a {@code FileSplitter} (to split text-based files by line) that includes (or not) beginning/end of file markers.$$ *($$Boolean$$, default: `$$<none>$$`)*
$$splitter.markers-json$$:: $$When 'fileMarkers == true', specify if they should be produced as FileSplitter.FileMarker objects or JSON.$$ *($$Boolean$$, default: `$$true$$`)*
$$splitter.markers-json$$:: $$When 'fileMarkers == true', specify if they should be produced as FileSplitter.FileMarker objects or JSON.$$ *($$Boolean$$, default: `$$<none>$$`)*
//end::configuration-properties[]
//end::ref-doc[]

View File

@@ -29,12 +29,12 @@ $$username$$:: $$the username to use when connecting to the broker.$$ *($$String
=== mqtt.consumer
$$async$$:: $$whether or not to use async sends.$$ *($$Boolean$$, default: `$$false$$`)*
$$charset$$:: $$the charset used to convert a String payload to byte[].$$ *($$String$$, default: `$$UTF-8$$`)*
$$client-id$$:: $$identifies the client.$$ *($$String$$, default: `$$stream.client.id.sink$$`)*
$$qos$$:: $$the quality of service to use.$$ *($$Integer$$, default: `$$1$$`)*
$$retained$$:: $$whether to set the 'retained' flag.$$ *($$Boolean$$, default: `$$false$$`)*
$$topic$$:: $$the topic to which the sink will publish.$$ *($$String$$, default: `$$stream.mqtt$$`)*
$$async$$:: $$whether or not to use async sends.$$ *($$Boolean$$, default: `$$<none>$$`)*
$$charset$$:: $$the charset used to convert a String payload to byte[].$$ *($$String$$, default: `$$<none>$$`)*
$$client-id$$:: $$identifies the client.$$ *($$String$$, default: `$$<none>$$`)*
$$qos$$:: $$the quality of service to use.$$ *($$Integer$$, default: `$$<none>$$`)*
$$retained$$:: $$whether to set the 'retained' flag.$$ *($$Boolean$$, default: `$$<none>$$`)*
$$topic$$:: $$the topic to which the sink will publish.$$ *($$String$$, default: `$$<none>$$`)*
//end::configuration-properties[]
//end::ref-doc[]

View File

@@ -28,7 +28,7 @@
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>testcontainers</artifactId>
<version>1.9.1</version>
<version>${test-containers.version}</version>
<scope>test</scope>
</dependency>
</dependencies>

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2017-2020 the original author or authors.
* Copyright 2017-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.
@@ -17,7 +17,6 @@
package org.springframework.cloud.stream.app.mqtt.sink;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.testcontainers.containers.GenericContainer;
@@ -44,7 +43,7 @@ import static org.assertj.core.api.Assertions.assertThat;
public class MqttSinkTests {
static {
GenericContainer mosquitto = new GenericContainer("eclipse-mosquitto")
GenericContainer mosquitto = new GenericContainer("cyrilix/rabbitmq-mqtt")
.withExposedPorts(1883);
mosquitto.start();
final Integer mappedPort = mosquitto.getMappedPort(1883);
@@ -57,7 +56,6 @@ public class MqttSinkTests {
}
@Test
@Disabled
public void testMqttSink() {
try (ConfigurableApplicationContext context = new SpringApplicationBuilder(
TestChannelBinderConfiguration

View File

@@ -16,11 +16,11 @@ Properties grouped by prefix:
=== rabbit
$$converter-bean-name$$:: $$The bean name for a custom message converter; if omitted, a SimpleMessageConverter is used. If 'jsonConverter', a Jackson2JsonMessageConverter bean will be created for you.$$ *($$String$$, default: `$$<none>$$`)*
$$exchange$$:: $$Exchange name - overridden by exchangeNameExpression, if supplied.$$ *($$String$$, default: `$$<empty string>$$`)*
$$exchange$$:: $$Exchange name - overridden by exchangeNameExpression, if supplied.$$ *($$String$$, default: `$$<none>$$`)*
$$exchange-expression$$:: $$A SpEL expression that evaluates to an exchange name.$$ *($$Expression$$, default: `$$<none>$$`)*
$$mapped-request-headers$$:: $$Headers that will be mapped.$$ *($$String[]$$, default: `$$[*]$$`)*
$$own-connection$$:: $$When true, use a separate connection based on the boot properties.$$ *($$Boolean$$, default: `$$false$$`)*
$$persistent-delivery-mode$$:: $$Default delivery mode when 'amqp_deliveryMode' header is not present, true for PERSISTENT.$$ *($$Boolean$$, default: `$$false$$`)*
$$mapped-request-headers$$:: $$Headers that will be mapped.$$ *($$String[]$$, default: `$$<none>$$`)*
$$own-connection$$:: $$When true, use a separate connection based on the boot properties.$$ *($$Boolean$$, default: `$$<none>$$`)*
$$persistent-delivery-mode$$:: $$Default delivery mode when 'amqp_deliveryMode' header is not present, true for PERSISTENT.$$ *($$Boolean$$, default: `$$<none>$$`)*
$$routing-key$$:: $$Routing key - overridden by routingKeyExpression, if supplied.$$ *($$String$$, default: `$$<none>$$`)*
$$routing-key-expression$$:: $$A SpEL expression that evaluates to a routing key.$$ *($$Expression$$, default: `$$<none>$$`)*

View File

@@ -49,13 +49,13 @@
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>testcontainers</artifactId>
<version>1.9.1</version>
<version>${test-containers.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>rabbitmq</artifactId>
<version>1.12.5</version>
<version>${test-containers.version}</version>
<scope>test</scope>
</dependency>
</dependencies>

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016-2019 the original author or authors.
* Copyright 2016-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.
@@ -45,7 +45,7 @@ import org.springframework.test.annotation.DirtiesContext;
abstract class RabbitSinkIntegrationTests {
static {
GenericContainer rabbitmq = new GenericContainer("rabbitmq:3.5.3")
GenericContainer rabbitmq = new GenericContainer("rabbitmq")
.withExposedPorts(5672);
rabbitmq.start();
final Integer mappedPort = rabbitmq.getMappedPort(5672);

View File

@@ -16,7 +16,6 @@
package org.springframework.cloud.stream.app.sink.rabbit;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.springframework.amqp.core.Message;
@@ -32,7 +31,6 @@ import static org.assertj.core.api.Assertions.assertThat;
public class SimpleRoutingKeyAndCustomHeaderTests extends RabbitSinkIntegrationTests {
@Test
@Disabled
public void test() {
this.channels.send(MessageBuilder.withPayload("foo".getBytes())
.setHeader("bar", "baz")

View File

@@ -21,7 +21,7 @@ Properties grouped by prefix:
=== s3.common
$$endpoint-url$$:: $$Optional endpoint url to connect to s3 compatible storage.$$ *($$String$$, default: `$$<none>$$`)*
$$path-style-access$$:: $$Use path style access.$$ *($$Boolean$$, default: `$$false$$`)*
$$path-style-access$$:: $$Use path style access.$$ *($$Boolean$$, default: `$$<none>$$`)*
=== s3.consumer

View File

@@ -29,11 +29,11 @@ $$username$$:: $$the username to use when connecting to the broker.$$ *($$String
=== mqtt.supplier
$$binary$$:: $$true to leave the payload as bytes.$$ *($$Boolean$$, default: `$$false$$`)*
$$charset$$:: $$the charset used to convert bytes to String (when binary is false).$$ *($$String$$, default: `$$UTF-8$$`)*
$$client-id$$:: $$identifies the client.$$ *($$String$$, default: `$$stream.client.id.source$$`)*
$$qos$$:: $$the qos; a single value for all topics or a comma-delimited list to match the topics.$$ *($$Integer[]$$, default: `$$[0]$$`)*
$$topics$$:: $$the topic(s) (comma-delimited) to which the source will subscribe.$$ *($$String[]$$, default: `$$[stream.mqtt]$$`)*
$$binary$$:: $$true to leave the payload as bytes.$$ *($$Boolean$$, default: `$$<none>$$`)*
$$charset$$:: $$the charset used to convert bytes to String (when binary is false).$$ *($$String$$, default: `$$<none>$$`)*
$$client-id$$:: $$identifies the client.$$ *($$String$$, default: `$$<none>$$`)*
$$qos$$:: $$the qos; a single value for all topics or a comma-delimited list to match the topics.$$ *($$Integer[]$$, default: `$$<none>$$`)*
$$topics$$:: $$the topic(s) (comma-delimited) to which the source will subscribe.$$ *($$String[]$$, default: `$$<none>$$`)*
//end::configuration-properties[]
//end::ref-doc[]

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.
@@ -17,7 +17,6 @@
package org.springframework.cloud.stream.app.source.mqtt;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.testcontainers.containers.GenericContainer;
@@ -44,7 +43,7 @@ import static org.assertj.core.api.Assertions.assertThat;
public class MqttSourceTests {
static {
GenericContainer mosquitto = new GenericContainer("eclipse-mosquitto")
GenericContainer mosquitto = new GenericContainer("cyrilix/rabbitmq-mqtt")
.withExposedPorts(1883);
mosquitto.start();
final Integer mappedPort = mosquitto.getMappedPort(1883);
@@ -57,7 +56,6 @@ public class MqttSourceTests {
}
@Test
@Disabled
public void testMqttSource() {
try (ConfigurableApplicationContext context = new SpringApplicationBuilder(
TestChannelBinderConfiguration

View File

@@ -102,20 +102,20 @@ $$root$$:: $$Root node - store entries are children of this node.$$ *($$String$$
=== s3.common
$$endpoint-url$$:: $$Optional endpoint url to connect to s3 compatible storage.$$ *($$String$$, default: `$$<none>$$`)*
$$path-style-access$$:: $$Use path style access.$$ *($$Boolean$$, default: `$$false$$`)*
$$path-style-access$$:: $$Use path style access.$$ *($$Boolean$$, default: `$$<none>$$`)*
=== s3.supplier
$$auto-create-local-dir$$:: $$Create or not the local directory.$$ *($$Boolean$$, default: `$$true$$`)*
$$delete-remote-files$$:: $$Delete or not remote files after processing.$$ *($$Boolean$$, default: `$$false$$`)*
$$auto-create-local-dir$$:: $$Create or not the local directory.$$ *($$Boolean$$, default: `$$<none>$$`)*
$$delete-remote-files$$:: $$Delete or not remote files after processing.$$ *($$Boolean$$, default: `$$<none>$$`)*
$$filename-pattern$$:: $$The pattern to filter remote files.$$ *($$String$$, default: `$$<none>$$`)*
$$filename-regex$$:: $$The regexp to filter remote files.$$ *($$Pattern$$, default: `$$<none>$$`)*
$$list-only$$:: $$Set to true to return s3 object metadata without copying file to a local directory.$$ *($$Boolean$$, default: `$$false$$`)*
$$list-only$$:: $$Set to true to return s3 object metadata without copying file to a local directory.$$ *($$Boolean$$, default: `$$<none>$$`)*
$$local-dir$$:: $$The local directory to store files.$$ *($$File$$, default: `$$<none>$$`)*
$$preserve-timestamp$$:: $$To transfer or not the timestamp of the remote file to the local one.$$ *($$Boolean$$, default: `$$true$$`)*
$$remote-dir$$:: $$AWS S3 bucket resource.$$ *($$String$$, default: `$$bucket$$`)*
$$remote-file-separator$$:: $$Remote File separator.$$ *($$String$$, default: `$$/$$`)*
$$tmp-file-suffix$$:: $$Temporary file suffix.$$ *($$String$$, default: `$$.tmp$$`)*
$$preserve-timestamp$$:: $$To transfer or not the timestamp of the remote file to the local one.$$ *($$Boolean$$, default: `$$<none>$$`)*
$$remote-dir$$:: $$AWS S3 bucket resource.$$ *($$String$$, default: `$$<none>$$`)*
$$remote-file-separator$$:: $$Remote File separator.$$ *($$String$$, default: `$$<none>$$`)*
$$tmp-file-suffix$$:: $$Temporary file suffix.$$ *($$String$$, default: `$$<none>$$`)*
//end::configuration-properties[]
== Amazon AWS common options

View File

@@ -130,31 +130,31 @@ $$root$$:: $$Root node - store entries are children of this node.$$ *($$String$$
=== sftp.supplier
$$auto-create-local-dir$$:: $$Set to true to create the local directory if it does not exist.$$ *($$Boolean$$, default: `$$true$$`)*
$$delay-when-empty$$:: $$Duration of delay when no new files are detected.$$ *($$Duration$$, default: `$$1s$$`)*
$$delete-remote-files$$:: $$Set to true to delete remote files after successful transfer.$$ *($$Boolean$$, default: `$$false$$`)*
$$auto-create-local-dir$$:: $$Set to true to create the local directory if it does not exist.$$ *($$Boolean$$, default: `$$<none>$$`)*
$$delay-when-empty$$:: $$Duration of delay when no new files are detected.$$ *($$Duration$$, default: `$$<none>$$`)*
$$delete-remote-files$$:: $$Set to true to delete remote files after successful transfer.$$ *($$Boolean$$, default: `$$<none>$$`)*
$$directories$$:: $$A list of factory "name.directory" pairs.$$ *($$String[]$$, default: `$$<none>$$`)*
$$factories$$:: $$A map of factory names to factories.$$ *($$Map<String, Factory>$$, default: `$$<none>$$`)*
$$fair$$:: $$True for fair rotation of multiple servers/directories. This is false by default so if a source has more than one entry, these will be received before the other sources are visited.$$ *($$Boolean$$, default: `$$false$$`)*
$$fair$$:: $$True for fair rotation of multiple servers/directories. This is false by default so if a source has more than one entry, these will be received before the other sources are visited.$$ *($$Boolean$$, default: `$$<none>$$`)*
$$filename-pattern$$:: $$A filter pattern to match the names of files to transfer.$$ *($$String$$, default: `$$<none>$$`)*
$$filename-regex$$:: $$A filter regex pattern to match the names of files to transfer.$$ *($$Pattern$$, default: `$$<none>$$`)*
$$list-only$$:: $$Set to true to return file metadata without the entire payload.$$ *($$Boolean$$, default: `$$false$$`)*
$$list-only$$:: $$Set to true to return file metadata without the entire payload.$$ *($$Boolean$$, default: `$$<none>$$`)*
$$local-dir$$:: $$The local directory to use for file transfers.$$ *($$File$$, default: `$$<none>$$`)*
$$max-fetch$$:: $$The maximum number of remote files to fetch per poll; default unlimited. Does not apply when listing files or building task launch requests.$$ *($$Integer$$, default: `$$<none>$$`)*
$$preserve-timestamp$$:: $$Set to true to preserve the original timestamp.$$ *($$Boolean$$, default: `$$true$$`)*
$$remote-dir$$:: $$The remote FTP directory.$$ *($$String$$, default: `$$/$$`)*
$$remote-file-separator$$:: $$The remote file separator.$$ *($$String$$, default: `$$/$$`)*
$$stream$$:: $$Set to true to stream the file rather than copy to a local directory.$$ *($$Boolean$$, default: `$$false$$`)*
$$tmp-file-suffix$$:: $$The suffix to use while the transfer is in progress.$$ *($$String$$, default: `$$.tmp$$`)*
$$preserve-timestamp$$:: $$Set to true to preserve the original timestamp.$$ *($$Boolean$$, default: `$$<none>$$`)*
$$remote-dir$$:: $$The remote FTP directory.$$ *($$String$$, default: `$$<none>$$`)*
$$remote-file-separator$$:: $$The remote file separator.$$ *($$String$$, default: `$$<none>$$`)*
$$stream$$:: $$Set to true to stream the file rather than copy to a local directory.$$ *($$Boolean$$, default: `$$<none>$$`)*
$$tmp-file-suffix$$:: $$The suffix to use while the transfer is in progress.$$ *($$String$$, default: `$$<none>$$`)*
=== sftp.supplier.factory
$$allow-unknown-keys$$:: $$True to allow an unknown or changed key.$$ *($$Boolean$$, default: `$$false$$`)*
$$host$$:: $$The host name of the server.$$ *($$String$$, default: `$$localhost$$`)*
$$allow-unknown-keys$$:: $$True to allow an unknown or changed key.$$ *($$Boolean$$, default: `$$<none>$$`)*
$$host$$:: $$The host name of the server.$$ *($$String$$, default: `$$<none>$$`)*
$$known-hosts-expression$$:: $$A SpEL expression resolving to the location of the known hosts file.$$ *($$Expression$$, default: `$$<none>$$`)*
$$pass-phrase$$:: $$Passphrase for user's private key.$$ *($$String$$, default: `$$<empty string>$$`)*
$$pass-phrase$$:: $$Passphrase for user's private key.$$ *($$String$$, default: `$$<none>$$`)*
$$password$$:: $$The password to use to connect to the server.$$ *($$String$$, default: `$$<none>$$`)*
$$port$$:: $$The port of the server.$$ *($$Integer$$, default: `$$22$$`)*
$$port$$:: $$The port of the server.$$ *($$Integer$$, default: `$$<none>$$`)*
$$private-key$$:: $$Resource location of user's private key.$$ *($$Resource$$, default: `$$<none>$$`)*
$$username$$:: $$The username to use to connect to the server.$$ *($$String$$, default: `$$<none>$$`)*

View File

@@ -22,7 +22,9 @@ import org.testcontainers.utility.DockerImageName;
/**
* Initializes and starts a {@link KafkaContainer}.
*
* @author David Turanski
* @author Artem Bilan
*/
public abstract class KafkaConfig {
@@ -32,7 +34,7 @@ public abstract class KafkaConfig {
* The KafkaContainer.
*/
public final static KafkaContainer kafka = new KafkaContainer(
DockerImageName.parse("confluentinc/cp-kafka:5.5.1"))
DockerImageName.parse("confluentinc/cp-kafka"))
.withExposedPorts(9092, 9093)
.withNetwork(network);

View File

@@ -18,6 +18,7 @@ package org.springframework.cloud.fn.common.cdc;
import java.time.Duration;
import com.zaxxer.hikari.HikariDataSource;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import org.testcontainers.containers.GenericContainer;
@@ -29,8 +30,6 @@ import org.springframework.boot.test.context.runner.ApplicationContextRunner;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.test.jdbc.JdbcTestUtils;
import com.zaxxer.hikari.HikariDataSource;
import static org.assertj.core.api.Assertions.assertThat;
import static org.awaitility.Awaitility.await;
@@ -48,7 +47,7 @@ public class CdcBootStarterIntegrationTest {
@Container
static GenericContainer debeziumMySQL =
new GenericContainer<>(DockerImageName.parse("debezium/example-mysql:latest"))
new GenericContainer<>(DockerImageName.parse("debezium/example-mysql"))
.withEnv("MYSQL_ROOT_PASSWORD", "debezium")
.withEnv("MYSQL_USER", "mysqluser")
.withEnv("MYSQL_PASSWORD", "mysqlpw")

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2017-2020 the original author or authors.
* Copyright 2017-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.
@@ -19,7 +19,6 @@ package org.springframework.cloud.fn.consumer.mqtt;
import java.util.function.Consumer;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.testcontainers.containers.GenericContainer;
@@ -43,7 +42,7 @@ import static org.assertj.core.api.Assertions.assertThat;
public class MqttConsumerTests {
static {
GenericContainer mosquitto = new GenericContainer("eclipse-mosquitto")
GenericContainer mosquitto = new GenericContainer("cyrilix/rabbitmq-mqtt")
.withExposedPorts(1883);
mosquitto.start();
final Integer mappedPort = mosquitto.getMappedPort(1883);
@@ -62,7 +61,6 @@ public class MqttConsumerTests {
}
@Test
@Disabled
public void testMqttConsumer() {
this.mqttConsumer.accept(MessageBuilder.withPayload("hello").build());
Message<?> in = this.queue.receive(10000);
@@ -97,5 +95,7 @@ public class MqttConsumerTests {
public QueueChannel queue() {
return new QueueChannel();
}
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2017-2020 the original author or authors.
* Copyright 2017-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.
@@ -19,7 +19,6 @@ package org.springframework.cloud.fn.supplier.mqtt;
import java.util.function.Supplier;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.testcontainers.containers.GenericContainer;
import reactor.core.publisher.Flux;
@@ -45,6 +44,7 @@ import static org.assertj.core.api.Assertions.assertThat;
* @author Janne Valkealahti
* @author Gary Russell
* @author Soby Chacko
* @author Artem Bilan
*
*/
@SpringBootTest(properties = {"mqtt.supplier.topics=test,fake", "mqtt.supplier.qos=0,0"})
@@ -52,7 +52,7 @@ import static org.assertj.core.api.Assertions.assertThat;
public class MqttSupplierTests {
static {
GenericContainer mosquitto = new GenericContainer("eclipse-mosquitto")
GenericContainer mosquitto = new GenericContainer("cyrilix/rabbitmq-mqtt")
.withExposedPorts(1883);
mosquitto.start();
final Integer mappedPort = mosquitto.getMappedPort(1883);
@@ -71,7 +71,6 @@ public class MqttSupplierTests {
private MessageHandler mqttOutbound;
@Test
@Disabled
public void testBasicFlow() {
mqttOutbound.handleMessage(MessageBuilder.withPayload("hello").build());

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016-2020 the original author or authors.
* Copyright 2016-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.
@@ -117,6 +117,16 @@ public abstract class AbstractAwsS3SupplierMockTests {
@AfterAll
public static void tearDown() {
System.clearProperty("s3.supplier.localDir");
S3_OBJECTS.stream()
.map(S3Object::getObjectContent)
.forEach(stream -> {
try {
stream.close();
}
catch (IOException e) {
// Ignore
}
});
}
@SpringBootApplication
@@ -141,9 +151,7 @@ public abstract class AbstractAwsS3SupplierMockTests {
objectSummaries.add(s3ObjectSummary);
}
willAnswer(invocation -> {
return objectListing;
}).given(amazonS3).listObjects(any(ListObjectsRequest.class));
willAnswer(invocation -> objectListing).given(amazonS3).listObjects(any(ListObjectsRequest.class));
for (final S3Object s3Object : S3_OBJECTS) {
willAnswer(invocation -> s3Object).given(amazonS3).getObject(S3_BUCKET, s3Object.getKey());