Skip to content

Commit

Permalink
Upgrade SpringBoot version
Browse files Browse the repository at this point in the history
Add property to tests with embedded kafka (see spring-cloud/spring-cloud-stream-binder-kafka#1079 )
  • Loading branch information
akutschera committed May 4, 2022
1 parent 335d577 commit b954b0b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 11 deletions.
10 changes: 2 additions & 8 deletions spring-cloud-messaging/pom.xml
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.4.5</version>
<version>2.6.7</version>
</parent>
<groupId>com.github.akutschera</groupId>
<artifactId>spring-cloud-messaging</artifactId>
Expand All @@ -15,7 +15,7 @@

<properties>
<java.version>11</java.version>
<spring-cloud.version>2020.0.2</spring-cloud.version>
<spring-cloud.version>2021.0.1</spring-cloud.version>
</properties>

<dependencies>
Expand All @@ -39,12 +39,6 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
Expand Down
Expand Up @@ -77,7 +77,7 @@ void testConsumer() {
void testFunction() throws IOException {
inputDestination.send( MessageBuilder.withPayload( "{ \"name\": \"foo\" }" ).build(), "throughput-topic" );

var payload = outputDestination.receive().getPayload();
var payload = outputDestination.receive(1_000L, "conversion-output-topic").getPayload();

var address = new ObjectMapper().readValue( payload, Address.class );

Expand Down
Expand Up @@ -26,7 +26,8 @@
* Created by Andreas Kutschera.
*/
@SpringBootTest(properties = {
"spring.kafka.bootstrap-servers=${spring.embedded.kafka.brokers}"
"spring.kafka.bootstrap-servers=${spring.embedded.kafka.brokers}",
"spring.cloud.stream.kafka.bindings.convertPersonToAddress-in-0.consumer.ack-mode=BATCH"
})
@EmbeddedKafka(topics = { "person-in", "address-out" })
@ActiveProfiles("kafka")
Expand Down
Expand Up @@ -23,7 +23,8 @@
* Created by Andreas Kutschera.
*/
@SpringBootTest(properties = {
"spring.kafka.bootstrap-servers=${spring.embedded.kafka.brokers}"
"spring.kafka.bootstrap-servers=${spring.embedded.kafka.brokers}",
"spring.cloud.stream.kafka.bindings.convertPersonToAddress-in-0.consumer.ack-mode=BATCH"
})
@EmbeddedKafka(topics = { "person-in", "dead-out", "address-out" })
@ActiveProfiles("kafka-with-dlq")
Expand Down

0 comments on commit b954b0b

Please sign in to comment.