diff --git a/build.gradle b/build.gradle index 05cdd632f7..6375005272 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,5 @@ buildscript { - ext.kotlinVersion = '1.7.10' + ext.kotlinVersion = '1.7.20' ext.isCI = System.getenv('GITHUB_ACTION') || System.getenv('bamboo_buildKey') repositories { mavenCentral() diff --git a/spring-integration-kafka/src/test/java/org/springframework/integration/kafka/dsl/KafkaDslTests.java b/spring-integration-kafka/src/test/java/org/springframework/integration/kafka/dsl/KafkaDslTests.java index d9f5446495..18d680fb41 100644 --- a/spring-integration-kafka/src/test/java/org/springframework/integration/kafka/dsl/KafkaDslTests.java +++ b/spring-integration-kafka/src/test/java/org/springframework/integration/kafka/dsl/KafkaDslTests.java @@ -445,7 +445,8 @@ public class KafkaDslTests { .get(); } - private GenericMessageListenerContainer replyContainer() { + @Bean + public GenericMessageListenerContainer replyContainer() { ContainerProperties containerProperties = new ContainerProperties(TEST_TOPIC5); containerProperties.setGroupId("outGate"); containerProperties.setConsumerRebalanceListener(new ConsumerRebalanceListener() { diff --git a/spring-integration-kafka/src/test/kotlin/org/springframework/integration/kafka/dsl/kotlin/KafkaDslKotlinTests.kt b/spring-integration-kafka/src/test/kotlin/org/springframework/integration/kafka/dsl/kotlin/KafkaDslKotlinTests.kt index 4f993e00c1..52a07a08bd 100644 --- a/spring-integration-kafka/src/test/kotlin/org/springframework/integration/kafka/dsl/kotlin/KafkaDslKotlinTests.kt +++ b/spring-integration-kafka/src/test/kotlin/org/springframework/integration/kafka/dsl/kotlin/KafkaDslKotlinTests.kt @@ -190,7 +190,7 @@ class KafkaDslKotlinTests { @Test fun testGateways() { - assertThat(this.config.replyContainerLatch.await(30, TimeUnit.SECONDS)) + assertThat(this.config.replyContainerLatch.await(30, TimeUnit.SECONDS)).isTrue() assertThat(this.gate.exchange(TEST_TOPIC4, "foo")).isEqualTo("FOO") } @@ -292,7 +292,7 @@ class KafkaDslKotlinTests { private fun kafkaMessageHandler(producerFactory: ProducerFactory, topic: String) = Kafka.outboundChannelAdapter(producerFactory) - .messageKey { it.headers[IntegrationMessageHeaderAccessor.SEQUENCE_NUMBER] } + .messageKey { it.headers[IntegrationMessageHeaderAccessor.SEQUENCE_NUMBER] } .headerMapper(mapper()) .sync(true) .partitionId { 0 } @@ -326,7 +326,8 @@ class KafkaDslKotlinTests { ) } - private fun replyContainer(): GenericMessageListenerContainer { + @Bean + fun replyContainer(): GenericMessageListenerContainer { val containerProperties = ContainerProperties(TEST_TOPIC5) containerProperties.setGroupId("kotlinOutGate") containerProperties.setConsumerRebalanceListener(object : ConsumerRebalanceListener {