From ae58effa25e93705b5771eb98462c484a9601ff5 Mon Sep 17 00:00:00 2001 From: abilan Date: Wed, 22 Mar 2023 12:27:31 -0400 Subject: [PATCH] Fix Kafka test for latest Spring Retry --- .../integration/kafka/inbound/InboundGatewayTests.java | 6 +++--- .../kafka/inbound/MessageDrivenAdapterTests.java | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/spring-integration-kafka/src/test/java/org/springframework/integration/kafka/inbound/InboundGatewayTests.java b/spring-integration-kafka/src/test/java/org/springframework/integration/kafka/inbound/InboundGatewayTests.java index e222925507..6f93d6bc65 100644 --- a/spring-integration-kafka/src/test/java/org/springframework/integration/kafka/inbound/InboundGatewayTests.java +++ b/spring-integration-kafka/src/test/java/org/springframework/integration/kafka/inbound/InboundGatewayTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2022 the original author or authors. + * Copyright 2018-2023 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. @@ -56,8 +56,8 @@ import org.springframework.messaging.MessagingException; import org.springframework.messaging.support.ErrorMessage; import org.springframework.retry.RetryCallback; import org.springframework.retry.RetryContext; +import org.springframework.retry.RetryListener; import org.springframework.retry.backoff.NoBackOffPolicy; -import org.springframework.retry.listener.RetryListenerSupport; import org.springframework.retry.policy.SimpleRetryPolicy; import org.springframework.retry.support.RetryTemplate; @@ -392,7 +392,7 @@ class InboundGatewayTests { retryTemplate.setRetryPolicy(retryPolicy); retryTemplate.setBackOffPolicy(new NoBackOffPolicy()); final CountDownLatch retryCountLatch = new CountDownLatch(retryPolicy.getMaxAttempts()); - retryTemplate.registerListener(new RetryListenerSupport() { + retryTemplate.registerListener(new RetryListener() { @Override public void onError(RetryContext context, RetryCallback callback, diff --git a/spring-integration-kafka/src/test/java/org/springframework/integration/kafka/inbound/MessageDrivenAdapterTests.java b/spring-integration-kafka/src/test/java/org/springframework/integration/kafka/inbound/MessageDrivenAdapterTests.java index 7d726ad685..66b1de007f 100644 --- a/spring-integration-kafka/src/test/java/org/springframework/integration/kafka/inbound/MessageDrivenAdapterTests.java +++ b/spring-integration-kafka/src/test/java/org/springframework/integration/kafka/inbound/MessageDrivenAdapterTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2022 the original author or authors. + * Copyright 2016-2023 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. @@ -83,7 +83,7 @@ import org.springframework.messaging.PollableChannel; import org.springframework.messaging.support.ErrorMessage; import org.springframework.retry.RetryCallback; import org.springframework.retry.RetryContext; -import org.springframework.retry.listener.RetryListenerSupport; +import org.springframework.retry.RetryListener; import org.springframework.retry.policy.SimpleRetryPolicy; import org.springframework.retry.support.RetryTemplate; @@ -310,7 +310,7 @@ class MessageDrivenAdapterTests { retryPolicy.setMaxAttempts(2); retryTemplate.setRetryPolicy(retryPolicy); final CountDownLatch retryCountLatch = new CountDownLatch(retryPolicy.getMaxAttempts()); - retryTemplate.registerListener(new RetryListenerSupport() { + retryTemplate.registerListener(new RetryListener() { @Override public void onError(RetryContext context, RetryCallback callback,