Skip to content

Commit

Permalink
Move dependencies to Milestones for release
Browse files Browse the repository at this point in the history
* Adapt code to the changes in upstream libs
* Change consumer groups in Kafka tests to unique values to avoid clashes
  • Loading branch information
artembilan committed Sep 20, 2022
1 parent 8c73a2d commit 91a8b14
Show file tree
Hide file tree
Showing 6 changed files with 65 additions and 58 deletions.
74 changes: 37 additions & 37 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ plugins {
id 'org.sonarqube' version '2.8'
id 'io.spring.nohttp' version '0.0.10' apply false
id 'org.ajoberstar.grgit' version '4.1.1'
id 'io.spring.dependency-management' version '1.0.12.RELEASE'
id 'com.jfrog.artifactory' version '4.28.4' apply false
id 'io.spring.dependency-management' version '1.0.13.RELEASE'
id 'com.jfrog.artifactory' version '4.29.0' apply false
id 'org.jetbrains.dokka' version '1.7.10'
id 'org.asciidoctor.jvm.pdf' version '3.3.2'
id 'org.asciidoctor.jvm.gems' version '3.3.2'
Expand Down Expand Up @@ -47,12 +47,12 @@ ext {
modifiedFiles =
files(grgit.status().unstaged.modified).filter { f -> f.name.endsWith('.java') || f.name.endsWith('.kt') }

apacheSshdVersion = '2.8.0'
artemisVersion = '2.23.1'
apacheSshdVersion = '2.9.1'
artemisVersion = '2.25.0'
aspectjVersion = '1.9.9.1'
assertjVersion = '3.23.1'
assertkVersion = '0.25'
avroVersion = '1.11.0'
avroVersion = '1.11.1'
awaitilityVersion = '4.2.0'
camelVersion = '3.18.2'
commonsDbcp2Version = '2.9.0'
Expand All @@ -63,53 +63,53 @@ ext {
findbugsVersion = '3.0.1'
ftpServerVersion = '1.2.0'
greenmailVersion = '2.0.0-alpha-2'
groovyVersion = '3.0.11'
groovyVersion = '3.0.13'
hamcrestVersion = '2.2'
hazelcastVersion = '5.1.2'
hibernateVersion = '6.1.1.Final'
hsqldbVersion = '2.6.1'
h2Version = '2.1.212'
jacksonVersion = '2.13.3'
hazelcastVersion = '5.1.3'
hibernateVersion = '6.1.3.Final'
hsqldbVersion = '2.7.0'
h2Version = '2.1.214'
jacksonVersion = '2.13.4'
jaxbVersion = '3.0.2'
jcifsVersion = '2.1.31'
jcifsVersion = '2.1.32'
jeroMqVersion = '0.5.2'
jmsApiVersion = '3.0.0'
jpaApiVersion = '3.0.2'
jrubyVersion = '9.3.3.0'
jpaApiVersion = '3.0.3'
jrubyVersion = '9.3.8.0'
jschVersion = '0.1.55'
jsonpathVersion = '2.7.0'
junit4Version = '4.13.2'
junitJupiterVersion = '5.8.2'
jythonVersion = '2.7.2'
junitJupiterVersion = '5.9.0'
jythonVersion = '2.7.3'
kryoVersion = '5.3.0'
lettuceVersion = '6.2.0.RELEASE'
log4jVersion = '2.18.0'
log4jVersion = '2.19.0'
mailVersion = '2.0.1'
micrometerVersion = '1.10.0-SNAPSHOT'
micrometerTracingVersion = '1.0.0-SNAPSHOT'
mockitoVersion = '4.6.1'
mongoDriverVersion = '4.7.0'
mysqlVersion = '8.0.29'
micrometerVersion = '1.10.0-M6'
micrometerTracingVersion = '1.0.0-M8'
mockitoVersion = '4.8.0'
mongoDriverVersion = '4.7.1'
mysqlVersion = '8.0.30'
pahoMqttClientVersion = '1.2.5'
postgresVersion = '42.3.3'
postgresVersion = '42.5.0'
r2dbch2Version = '1.0.0.RC1'
reactorVersion = '2022.0.0-SNAPSHOT'
reactorVersion = '2022.0.0-M6'
resilience4jVersion = '1.7.1'
romeToolsVersion = '1.18.0'
rsocketVersion = '1.1.2'
saajVersion = '2.0.1'
rsocketVersion = '1.1.3'
saajVersion = '3.0.0'
servletApiVersion = '5.0.0'
smackVersion = '4.4.5'
springAmqpVersion = project.hasProperty('springAmqpVersion') ? project.springAmqpVersion : '3.0.0-SNAPSHOT'
springDataVersion = project.hasProperty('springDataVersion') ? project.springDataVersion : '2022.0.0-SNAPSHOT'
springGraphqlVersion = '1.0.1'
springKafkaVersion = '3.0.0-SNAPSHOT'
springRetryVersion = '1.3.3'
springSecurityVersion = project.hasProperty('springSecurityVersion') ? project.springSecurityVersion : '6.0.0-SNAPSHOT'
springVersion = project.hasProperty('springVersion') ? project.springVersion : '6.0.0-SNAPSHOT'
springWsVersion = '4.0.0-SNAPSHOT'
smackVersion = '4.4.6'
springAmqpVersion = project.hasProperty('springAmqpVersion') ? project.springAmqpVersion : '3.0.0-M4'
springDataVersion = project.hasProperty('springDataVersion') ? project.springDataVersion : '2022.0.0-M6'
springGraphqlVersion = '1.1.0-M1'
springKafkaVersion = '3.0.0-M6'
springRetryVersion = '2.0.0-M1'
springSecurityVersion = project.hasProperty('springSecurityVersion') ? project.springSecurityVersion : '6.0.0-M7'
springVersion = project.hasProperty('springVersion') ? project.springVersion : '6.0.0-M6'
springWsVersion = '4.0.0-M2'
testcontainersVersion = '1.17.3'
tomcatVersion = '10.0.21'
tomcatVersion = '10.0.23'
xmlUnitVersion = '2.9.0'
xstreamVersion = '1.4.19'

Expand Down Expand Up @@ -362,7 +362,7 @@ configure(javaProjects) { subproject ->

checkstyle {
configDirectory.set(rootProject.file('src/checkstyle'))
toolVersion = project.hasProperty('checkstyleVersion') ? project.checkstyleVersion : '10.2'
toolVersion = project.hasProperty('checkstyleVersion') ? project.checkstyleVersion : '10.3.3'
}

jar {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2014-2019 the original author or authors.
* Copyright 2014-2022 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.
Expand All @@ -20,17 +20,16 @@

import java.util.List;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.jupiter.api.Test;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.integration.handler.advice.RequestHandlerRetryAdvice;
import org.springframework.integration.test.util.TestUtils;
import org.springframework.messaging.MessageChannel;
import org.springframework.messaging.MessageHandler;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.retry.backoff.FixedBackOffPolicy;
import org.springframework.test.context.junit.jupiter.SpringJUnitConfig;

/**
* @author Gary Russell
Expand All @@ -39,8 +38,7 @@
* @since 4.0
*
*/
@ContextConfiguration
@RunWith(SpringJUnit4ClassRunner.class)
@SpringJUnitConfig
public class RetryAdviceParserTests {

@Autowired
Expand All @@ -64,13 +62,16 @@ public class RetryAdviceParserTests {
@Autowired
private RequestHandlerRetryAdvice a7;

@Autowired @Qualifier("sa1.handler")
@Autowired
@Qualifier("sa1.handler")
private MessageHandler handler1;

@Autowired @Qualifier("sa2.handler")
@Autowired
@Qualifier("sa2.handler")
private MessageHandler handler2;

@Autowired @Qualifier("saDefaultRetry.handler")
@Autowired
@Qualifier("saDefaultRetry.handler")
private MessageHandler defaultRetryHandler;

@Autowired
Expand All @@ -86,8 +87,14 @@ public void testAll() {
assertThat(TestUtils.getPropertyValue(a6, "retryTemplate.retryPolicy.maxAttempts")).isEqualTo(8);
assertThat(TestUtils.getPropertyValue(a7, "retryTemplate.retryPolicy.maxAttempts")).isEqualTo(3);

assertThat(TestUtils.getPropertyValue(a3, "retryTemplate.backOffPolicy.backOffPeriod")).isEqualTo(1000L);
assertThat(TestUtils.getPropertyValue(a4, "retryTemplate.backOffPolicy.backOffPeriod")).isEqualTo(1234L);
assertThat(
TestUtils.getPropertyValue(a3, "retryTemplate.backOffPolicy", FixedBackOffPolicy.class)
.getBackOffPeriod())
.isEqualTo(1000L);
assertThat(
TestUtils.getPropertyValue(a4, "retryTemplate.backOffPolicy", FixedBackOffPolicy.class)
.getBackOffPeriod())
.isEqualTo(1234L);

assertThat(TestUtils.getPropertyValue(a5, "retryTemplate.backOffPolicy.initialInterval")).isEqualTo(100L);
assertThat(TestUtils.getPropertyValue(a5, "retryTemplate.backOffPolicy.multiplier")).isEqualTo(2.0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,6 @@ public class KafkaDslTests {
@Qualifier("kafkaProducer1.handler")
private KafkaProducerMessageHandler<?, ?> kafkaProducer1;

@Autowired
@Qualifier("kafkaProducer2.handler")
private KafkaProducerMessageHandler<?, ?> kafkaProducer2;

@Autowired
private PollableChannel errorChannel;

Expand Down Expand Up @@ -281,7 +277,7 @@ public static class ContextConfiguration {

@Bean
public ConsumerFactory<Integer, String> consumerFactory() {
Map<String, Object> props = KafkaTestUtils.consumerProps(this.embeddedKafkaBrokers, "test1", "false");
Map<String, Object> props = KafkaTestUtils.consumerProps(this.embeddedKafkaBrokers, "dsl-group", "false");
props.put(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, "earliest");
return new DefaultKafkaConsumerFactory<>(props);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ void testInboundJson() {

@Test
void testInboundJsonWithPayload() {
Map<String, Object> props = KafkaTestUtils.consumerProps(EMBEDDED_BROKERS, "test6", "true");
Map<String, Object> props = KafkaTestUtils.consumerProps(EMBEDDED_BROKERS, "test7", "true");
props.put(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, "earliest");
DefaultKafkaConsumerFactory<Integer, Foo> cf = new DefaultKafkaConsumerFactory<>(props);
ContainerProperties containerProps = new ContainerProperties(topic6);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@
import org.springframework.kafka.test.EmbeddedKafkaBroker;
import org.springframework.kafka.test.utils.KafkaTestUtils;
import org.springframework.kafka.transaction.KafkaTransactionManager;
import org.springframework.lang.Nullable;
import org.springframework.messaging.Message;
import org.springframework.messaging.MessageHandlingException;
import org.springframework.messaging.MessagingException;
Expand All @@ -107,6 +108,8 @@
import org.springframework.transaction.support.DefaultTransactionStatus;
import org.springframework.transaction.support.TransactionTemplate;

import io.micrometer.observation.Observation;

/**
* @author Gary Russell
* @author Biju Kunjummen
Expand Down Expand Up @@ -313,7 +316,8 @@ void testOutboundWithAsyncResults() {

@Override
protected CompletableFuture<SendResult<Integer, String>> doSend(
ProducerRecord<Integer, String> producerRecord) {
ProducerRecord<Integer, String> producerRecord,
@Nullable Observation observation) {

CompletableFuture<SendResult<Integer, String>> future = new CompletableFuture<>();
future.completeExceptionally(fooException);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ class KafkaDslKotlinTests {

@Bean
fun consumerFactory(): ConsumerFactory<Int, String> {
val props = KafkaTestUtils.consumerProps(this.embeddedKafkaBrokers, "test1", "false")
val props = KafkaTestUtils.consumerProps(this.embeddedKafkaBrokers, "kotlin-group-test1", "false")
props[ConsumerConfig.AUTO_OFFSET_RESET_CONFIG] = "earliest"
return DefaultKafkaConsumerFactory(props)
}
Expand Down Expand Up @@ -292,7 +292,7 @@ class KafkaDslKotlinTests {

private fun kafkaMessageHandler(producerFactory: ProducerFactory<Int, String>, topic: String) =
Kafka.outboundChannelAdapter(producerFactory)
.messageKey<Any> { it.headers[IntegrationMessageHeaderAccessor.SEQUENCE_NUMBER] }
.messageKey { it.headers[IntegrationMessageHeaderAccessor.SEQUENCE_NUMBER] }
.headerMapper(mapper())
.sync(true)
.partitionId<Any> { 0 }
Expand Down

0 comments on commit 91a8b14

Please sign in to comment.