From 60dfce7adc606d802f92e15f0ea8adeb03ab7a59 Mon Sep 17 00:00:00 2001 From: Soby Chacko Date: Wed, 1 Nov 2023 15:31:03 -0400 Subject: [PATCH] [Test Cleanup] Kafka binder tests package private --- .../stream/binder/kafka/AbstractKafkaTestBinder.java | 4 ++-- .../cloud/stream/binder/kafka/AdminConfigTests.java | 2 +- .../stream/binder/kafka/AutoCreateTopicDisabledTests.java | 4 ++-- .../kafka/KafkaBinderAutoConfigurationPropertiesTest.java | 2 +- .../kafka/KafkaBinderConfigurationPropertiesTest.java | 2 +- .../binder/kafka/KafkaBinderHealthIndicatorTest.java | 2 +- .../kafka/KafkaBinderJaasInitializerListenerTest.java | 4 ++-- .../cloud/stream/binder/kafka/KafkaBinderMetricsTest.java | 4 ++-- .../cloud/stream/binder/kafka/KafkaBinderTests.java | 8 ++++---- .../cloud/stream/binder/kafka/KafkaBinderUnitTests.java | 4 ++-- .../cloud/stream/binder/kafka/KafkaTestBinder.java | 4 ++-- .../cloud/stream/binder/kafka/KafkaTransactionTests.java | 4 ++-- .../stream/binder/kafka/RawKafkaPartitionTestSupport.java | 4 ++-- .../cloud/stream/binder/kafka/TestKafkaProperties.java | 6 +++--- .../bootstrap/KafkaBinderCustomHealthCheckTests.java | 4 ++-- .../kafka/bootstrap/KafkaBinderMeterRegistryTest.java | 4 ++-- .../kafka/integration/KafkaBinderActuatorTests.java | 2 +- .../integration/KafkaBinderExtendedPropertiesTest.java | 2 +- .../kafka/integration/KafkaBindingServiceTests.java | 2 +- .../kafka/integration/KafkaConfigCustomizationTests.java | 2 +- .../binder/kafka/integration/KafkaNullConverterTest.java | 2 +- .../integration/KafkaRetryDlqBinderOrContainerTests.java | 4 ++-- .../kafka/integration/ProducerOnlyTransactionTests.java | 2 +- .../configs/BaseKafkaBinderTopicPropertiesUpdateTest.java | 2 +- .../DisabledKafkaBinderTopicPropertiesUpdateTest.java | 4 ++-- .../configs/KafkaBinderTopicPropertiesUpdateTest.java | 4 ++-- .../integration2/ConsumerProducerTransactionTests.java | 3 +-- 27 files changed, 45 insertions(+), 46 deletions(-) diff --git a/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/AbstractKafkaTestBinder.java b/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/AbstractKafkaTestBinder.java index 2035a5729..025b4fa5b 100644 --- a/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/AbstractKafkaTestBinder.java +++ b/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/AbstractKafkaTestBinder.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2018 the original author or authors. + * Copyright 2014-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. @@ -27,7 +27,7 @@ import org.springframework.context.ApplicationContext; * @author Soby Chacko * @author Gary Russell */ -public abstract class AbstractKafkaTestBinder extends +abstract class AbstractKafkaTestBinder extends // @checkstyle:off AbstractPollableConsumerTestBinder, ExtendedProducerProperties> { diff --git a/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/AdminConfigTests.java b/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/AdminConfigTests.java index 06fcdd54c..b2fc47c72 100644 --- a/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/AdminConfigTests.java +++ b/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/AdminConfigTests.java @@ -53,7 +53,7 @@ import static org.assertj.core.api.Assertions.assertThat; "spring.cloud.stream.kafka.bindings.output.producer.topic.properties.message.format.version=0.9.0.0", "spring.main.allow-bean-definition-overriding=true" }) @EnableIntegration -public class AdminConfigTests { +class AdminConfigTests { @Autowired private KafkaMessageChannelBinder binder; diff --git a/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/AutoCreateTopicDisabledTests.java b/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/AutoCreateTopicDisabledTests.java index b8006f745..782dfd709 100644 --- a/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/AutoCreateTopicDisabledTests.java +++ b/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/AutoCreateTopicDisabledTests.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. @@ -42,7 +42,7 @@ import static org.assertj.core.api.Assertions.assertThatExceptionOfType; * @author Soby Chacko */ @EmbeddedKafka(brokerProperties = {"auto.create.topics.enable=false"}) -public class AutoCreateTopicDisabledTests { +class AutoCreateTopicDisabledTests { private static final EmbeddedKafkaBroker embeddedKafka = EmbeddedKafkaCondition.getBroker(); diff --git a/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/KafkaBinderAutoConfigurationPropertiesTest.java b/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/KafkaBinderAutoConfigurationPropertiesTest.java index 2f0ca944f..ca70537df 100644 --- a/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/KafkaBinderAutoConfigurationPropertiesTest.java +++ b/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/KafkaBinderAutoConfigurationPropertiesTest.java @@ -47,7 +47,7 @@ import static org.assertj.core.api.Assertions.assertThat; */ @SpringBootTest(classes = { KafkaBinderConfiguration.class }) @TestPropertySource(locations = "classpath:binder-config-autoconfig.properties") -public class KafkaBinderAutoConfigurationPropertiesTest { +class KafkaBinderAutoConfigurationPropertiesTest { @Autowired private KafkaMessageChannelBinder kafkaMessageChannelBinder; diff --git a/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/KafkaBinderConfigurationPropertiesTest.java b/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/KafkaBinderConfigurationPropertiesTest.java index f6662f81f..fc3435900 100644 --- a/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/KafkaBinderConfigurationPropertiesTest.java +++ b/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/KafkaBinderConfigurationPropertiesTest.java @@ -49,7 +49,7 @@ import static org.assertj.core.api.Assertions.assertThat; @SpringBootTest(classes = { KafkaBinderConfiguration.class, KafkaAutoConfiguration.class, KafkaBinderConfigurationPropertiesTest.class }) @TestPropertySource(locations = "classpath:binder-config.properties") -public class KafkaBinderConfigurationPropertiesTest { +class KafkaBinderConfigurationPropertiesTest { @Autowired private KafkaMessageChannelBinder kafkaMessageChannelBinder; diff --git a/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/KafkaBinderHealthIndicatorTest.java b/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/KafkaBinderHealthIndicatorTest.java index ba22ace6a..33fee1bc4 100644 --- a/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/KafkaBinderHealthIndicatorTest.java +++ b/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/KafkaBinderHealthIndicatorTest.java @@ -55,7 +55,7 @@ import static org.mockito.ArgumentMatchers.any; * @author Taras Danylchuk */ @TestInstance(TestInstance.Lifecycle.PER_CLASS) -public class KafkaBinderHealthIndicatorTest { +class KafkaBinderHealthIndicatorTest { private static final String TEST_TOPIC = "test"; diff --git a/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/KafkaBinderJaasInitializerListenerTest.java b/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/KafkaBinderJaasInitializerListenerTest.java index e5522b229..33ee21bd0 100644 --- a/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/KafkaBinderJaasInitializerListenerTest.java +++ b/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/KafkaBinderJaasInitializerListenerTest.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. @@ -41,7 +41,7 @@ import static org.assertj.core.api.Assertions.assertThat; * @author Soby Chacko */ @EmbeddedKafka -public class KafkaBinderJaasInitializerListenerTest { +class KafkaBinderJaasInitializerListenerTest { private static final String KAFKA_BROKERS_PROPERTY = "spring.cloud.stream.kafka.binder.brokers"; diff --git a/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/KafkaBinderMetricsTest.java b/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/KafkaBinderMetricsTest.java index 5bcaf02f1..376fb51a2 100644 --- a/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/KafkaBinderMetricsTest.java +++ b/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/KafkaBinderMetricsTest.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. @@ -57,7 +57,7 @@ import static org.mockito.Mockito.mock; * @author Tomek Szmytka * @author Nico Heller */ -public class KafkaBinderMetricsTest { +class KafkaBinderMetricsTest { private static final String TEST_TOPIC = "test"; diff --git a/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/KafkaBinderTests.java b/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/KafkaBinderTests.java index 38487aef5..6ac42e4bc 100644 --- a/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/KafkaBinderTests.java +++ b/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/KafkaBinderTests.java @@ -179,7 +179,7 @@ import static org.mockito.Mockito.verify; */ @EmbeddedKafka(count = 1, controlledShutdown = true, topics = "error.pollableDlq.group-pcWithDlq", brokerProperties = {"transaction.state.log.replication.factor=1", "transaction.state.log.min.isr=1"}) -public class KafkaBinderTests extends +class KafkaBinderTests extends PartitionCapableBinderTests, ExtendedProducerProperties> { @@ -4132,15 +4132,15 @@ public class KafkaBinderTests extends } - public static class Pojo { + static class Pojo { private String field; - public Pojo() { + Pojo() { super(); } - public Pojo(String field) { + Pojo(String field) { this.field = field; } diff --git a/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/KafkaBinderUnitTests.java b/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/KafkaBinderUnitTests.java index 6c9e0a4c9..1adf6ab30 100644 --- a/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/KafkaBinderUnitTests.java +++ b/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/KafkaBinderUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2017-2022 the original author or authors. + * Copyright 2017-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. @@ -70,7 +70,7 @@ import static org.mockito.Mockito.verify; * @since 1.2.2 * */ -public class KafkaBinderUnitTests { +class KafkaBinderUnitTests { @Test void testPropertyOverrides() throws Exception { diff --git a/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/KafkaTestBinder.java b/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/KafkaTestBinder.java index c09249698..13b89e037 100644 --- a/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/KafkaTestBinder.java +++ b/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/KafkaTestBinder.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2018 the original author or authors. + * Copyright 2015-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. @@ -38,7 +38,7 @@ import org.springframework.kafka.support.ProducerListener; * @author Gary Russell * @author Soby Chacko */ -public class KafkaTestBinder extends AbstractKafkaTestBinder { +class KafkaTestBinder extends AbstractKafkaTestBinder { KafkaTestBinder(KafkaBinderConfigurationProperties binderConfiguration, KafkaTopicProvisioner kafkaTopicProvisioner) { diff --git a/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/KafkaTransactionTests.java b/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/KafkaTransactionTests.java index c3bbd27c4..5ca692e41 100644 --- a/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/KafkaTransactionTests.java +++ b/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/KafkaTransactionTests.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. @@ -59,7 +59,7 @@ import static org.mockito.Mockito.spy; */ @EmbeddedKafka(count = 1, controlledShutdown = true, brokerProperties = {"transaction.state.log.replication.factor=1", "transaction.state.log.min.isr=1"}) -public class KafkaTransactionTests { +class KafkaTransactionTests { private static EmbeddedKafkaBroker embeddedKafka; diff --git a/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/RawKafkaPartitionTestSupport.java b/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/RawKafkaPartitionTestSupport.java index 4d98f495c..676e88d93 100644 --- a/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/RawKafkaPartitionTestSupport.java +++ b/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/RawKafkaPartitionTestSupport.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2019 the original author or authors. + * Copyright 2014-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. @@ -23,7 +23,7 @@ import org.springframework.messaging.Message; /** * @author Marius Bogoevici */ -public class RawKafkaPartitionTestSupport +class RawKafkaPartitionTestSupport implements PartitionKeyExtractorStrategy, PartitionSelectorStrategy { @Override diff --git a/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/TestKafkaProperties.java b/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/TestKafkaProperties.java index 0c64b8bc2..63c3ff969 100644 --- a/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/TestKafkaProperties.java +++ b/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/TestKafkaProperties.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2019 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. @@ -29,9 +29,9 @@ import org.springframework.boot.autoconfigure.kafka.KafkaProperties; * @since 2.1 * */ -public class TestKafkaProperties extends KafkaProperties { +class TestKafkaProperties extends KafkaProperties { - public TestKafkaProperties() { + TestKafkaProperties() { getConsumer().setKeyDeserializer(ByteArrayDeserializer.class); getConsumer().setValueDeserializer(ByteArrayDeserializer.class); getProducer().setKeySerializer(ByteArraySerializer.class); diff --git a/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/bootstrap/KafkaBinderCustomHealthCheckTests.java b/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/bootstrap/KafkaBinderCustomHealthCheckTests.java index f4dadab51..3cdfab166 100644 --- a/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/bootstrap/KafkaBinderCustomHealthCheckTests.java +++ b/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/bootstrap/KafkaBinderCustomHealthCheckTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2022 the original author or authors. + * Copyright 2022-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. @@ -39,7 +39,7 @@ import static org.assertj.core.api.AssertionsForClassTypes.assertThatThrownBy; * @author Soby Chacko */ @EmbeddedKafka(count = 1, controlledShutdown = true) -public class KafkaBinderCustomHealthCheckTests { +class KafkaBinderCustomHealthCheckTests { private static EmbeddedKafkaBroker embeddedKafka; diff --git a/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/bootstrap/KafkaBinderMeterRegistryTest.java b/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/bootstrap/KafkaBinderMeterRegistryTest.java index 88cf55bb6..8224a0805 100644 --- a/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/bootstrap/KafkaBinderMeterRegistryTest.java +++ b/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/bootstrap/KafkaBinderMeterRegistryTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2019-2022 the original author or authors. + * Copyright 2019-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. @@ -46,7 +46,7 @@ import static org.assertj.core.api.Assertions.assertThatCode; * @author Soby Chacko */ @EmbeddedKafka(count = 1, controlledShutdown = true, partitions = 10, topics = "outputTopic") -public class KafkaBinderMeterRegistryTest { +class KafkaBinderMeterRegistryTest { private static EmbeddedKafkaBroker embeddedKafka; diff --git a/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/integration/KafkaBinderActuatorTests.java b/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/integration/KafkaBinderActuatorTests.java index ed05349a1..c54e8f7a6 100644 --- a/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/integration/KafkaBinderActuatorTests.java +++ b/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/integration/KafkaBinderActuatorTests.java @@ -67,7 +67,7 @@ import static org.assertj.core.api.Assertions.assertThat; ) @DirtiesContext @EmbeddedKafka(bootstrapServersProperty = "spring.kafka.bootstrap-servers") -public class KafkaBinderActuatorTests { +class KafkaBinderActuatorTests { static final String TEST_CONSUMER_GROUP = "testGroup-actuatorTests"; diff --git a/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/integration/KafkaBinderExtendedPropertiesTest.java b/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/integration/KafkaBinderExtendedPropertiesTest.java index f55c7b21c..d94a85c15 100644 --- a/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/integration/KafkaBinderExtendedPropertiesTest.java +++ b/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/integration/KafkaBinderExtendedPropertiesTest.java @@ -70,7 +70,7 @@ import static org.assertj.core.api.Assertions.assertThat; "spring.cloud.stream.kafka.bindings.custom-in.consumer.ackEachRecord=false" }) @DirtiesContext @EmbeddedKafka(bootstrapServersProperty = "spring.kafka.bootstrap-servers") -public class KafkaBinderExtendedPropertiesTest { +class KafkaBinderExtendedPropertiesTest { @Autowired private ConfigurableApplicationContext context; diff --git a/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/integration/KafkaBindingServiceTests.java b/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/integration/KafkaBindingServiceTests.java index 13acc6c2f..c197bd7ac 100644 --- a/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/integration/KafkaBindingServiceTests.java +++ b/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/integration/KafkaBindingServiceTests.java @@ -44,7 +44,7 @@ import static org.assertj.core.api.Assertions.assertThat; @DirtiesContext @EmbeddedKafka(topics = "kafka-binding-service-test", controlledShutdown = true, partitions = 4, bootstrapServersProperty = "spring.kafka.bootstrap-servers") -public class KafkaBindingServiceTests { +class KafkaBindingServiceTests { @Autowired private ApplicationContext context; diff --git a/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/integration/KafkaConfigCustomizationTests.java b/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/integration/KafkaConfigCustomizationTests.java index 07f47e369..3ed6c4a93 100644 --- a/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/integration/KafkaConfigCustomizationTests.java +++ b/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/integration/KafkaConfigCustomizationTests.java @@ -56,7 +56,7 @@ import static org.assertj.core.api.Assertions.assertThat; "spring.cloud.stream.bindings.process-in-0.group=KafkaConfigCustomizationTests.group"}) @DirtiesContext @EmbeddedKafka(bootstrapServersProperty = "spring.kafka.bootstrap-servers") -public class KafkaConfigCustomizationTests { +class KafkaConfigCustomizationTests { private static final String KAFKA_BROKERS_PROPERTY = "spring.cloud.stream.kafka.binder.brokers"; diff --git a/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/integration/KafkaNullConverterTest.java b/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/integration/KafkaNullConverterTest.java index 4c5e27273..0a0f40482 100644 --- a/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/integration/KafkaNullConverterTest.java +++ b/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/integration/KafkaNullConverterTest.java @@ -50,7 +50,7 @@ import static org.assertj.core.api.Assertions.assertThat; "spring.cloud.stream.function.bindings.inputListen-in-0=kafkaNullInput"}) @DirtiesContext @EmbeddedKafka(bootstrapServersProperty = "spring.kafka.bootstrap-servers") -public class KafkaNullConverterTest { +class KafkaNullConverterTest { @Autowired private ApplicationContext context; diff --git a/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/integration/KafkaRetryDlqBinderOrContainerTests.java b/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/integration/KafkaRetryDlqBinderOrContainerTests.java index 5bd83f38a..50f71e075 100644 --- a/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/integration/KafkaRetryDlqBinderOrContainerTests.java +++ b/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/integration/KafkaRetryDlqBinderOrContainerTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2021-2022 the original author or authors. + * Copyright 2021-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. @@ -61,7 +61,7 @@ import static org.mockito.Mockito.mock; "spring.cloud.stream.kafka.bindings.retryInContainer-in-0.consumer.enable-dlq=true"}) @EmbeddedKafka(bootstrapServersProperty = "spring.kafka.bootstrap-servers") @DirtiesContext -public class KafkaRetryDlqBinderOrContainerTests { +class KafkaRetryDlqBinderOrContainerTests { private static final CountDownLatch latch = new CountDownLatch(2); diff --git a/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/integration/ProducerOnlyTransactionTests.java b/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/integration/ProducerOnlyTransactionTests.java index 252bb6edb..6fa59fedd 100644 --- a/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/integration/ProducerOnlyTransactionTests.java +++ b/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/integration/ProducerOnlyTransactionTests.java @@ -65,7 +65,7 @@ import static org.assertj.core.api.Assertions.assertThat; @DirtiesContext @EmbeddedKafka(topics = "output", controlledShutdown = true, brokerProperties = {"transaction.state.log.replication.factor=1", "transaction.state.log.min.isr=1"}, bootstrapServersProperty = "spring.kafka.bootstrap-servers") -public class ProducerOnlyTransactionTests { +class ProducerOnlyTransactionTests { @Autowired private Sender sender; diff --git a/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/integration/topic/configs/BaseKafkaBinderTopicPropertiesUpdateTest.java b/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/integration/topic/configs/BaseKafkaBinderTopicPropertiesUpdateTest.java index e6dc54cd7..bc969d595 100644 --- a/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/integration/topic/configs/BaseKafkaBinderTopicPropertiesUpdateTest.java +++ b/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/integration/topic/configs/BaseKafkaBinderTopicPropertiesUpdateTest.java @@ -42,7 +42,7 @@ import org.springframework.test.annotation.DirtiesContext; }) @DirtiesContext @EmbeddedKafka(bootstrapServersProperty = "spring.kafka.bootstrap-servers") -public abstract class BaseKafkaBinderTopicPropertiesUpdateTest { +abstract class BaseKafkaBinderTopicPropertiesUpdateTest { @Autowired protected EmbeddedKafkaBroker embeddedKafka; diff --git a/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/integration/topic/configs/DisabledKafkaBinderTopicPropertiesUpdateTest.java b/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/integration/topic/configs/DisabledKafkaBinderTopicPropertiesUpdateTest.java index a7ca8ec4f..5d6a2be97 100644 --- a/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/integration/topic/configs/DisabledKafkaBinderTopicPropertiesUpdateTest.java +++ b/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/integration/topic/configs/DisabledKafkaBinderTopicPropertiesUpdateTest.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. @@ -34,7 +34,7 @@ import static org.assertj.core.api.Assertions.assertThat; /** * @author Taras Danylchuk */ -public class DisabledKafkaBinderTopicPropertiesUpdateTest extends BaseKafkaBinderTopicPropertiesUpdateTest { +class DisabledKafkaBinderTopicPropertiesUpdateTest extends BaseKafkaBinderTopicPropertiesUpdateTest { @Test void testKafkaBinderShouldNotUpdateTopicConfigurationOnDisabledFeature() throws Exception { diff --git a/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/integration/topic/configs/KafkaBinderTopicPropertiesUpdateTest.java b/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/integration/topic/configs/KafkaBinderTopicPropertiesUpdateTest.java index a1912afd0..6629747ec 100644 --- a/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/integration/topic/configs/KafkaBinderTopicPropertiesUpdateTest.java +++ b/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/integration/topic/configs/KafkaBinderTopicPropertiesUpdateTest.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. @@ -37,7 +37,7 @@ import static org.assertj.core.api.Assertions.assertThat; * @author Heiko Does */ @TestPropertySource(properties = "spring.cloud.stream.kafka.binder.autoAlterTopics=true") -public class KafkaBinderTopicPropertiesUpdateTest extends BaseKafkaBinderTopicPropertiesUpdateTest { +class KafkaBinderTopicPropertiesUpdateTest extends BaseKafkaBinderTopicPropertiesUpdateTest { @Test void testKafkaBinderUpdateTopicConfiguration() throws Exception { diff --git a/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/integration2/ConsumerProducerTransactionTests.java b/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/integration2/ConsumerProducerTransactionTests.java index 5cb3778c1..1061af1a3 100644 --- a/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/integration2/ConsumerProducerTransactionTests.java +++ b/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/integration2/ConsumerProducerTransactionTests.java @@ -51,7 +51,6 @@ import static org.mockito.Mockito.mock; /** * @author Gary Russell - * @author Soby Chacko * @since 3.0 * */ @@ -76,7 +75,7 @@ import static org.mockito.Mockito.mock; @DirtiesContext @EmbeddedKafka(topics = "consumer.producer.txOut", controlledShutdown = true, brokerProperties = {"transaction.state.log.replication.factor=1", "transaction.state.log.min.isr=1"}, bootstrapServersProperty = "spring.kafka.bootstrap-servers") -public class ConsumerProducerTransactionTests { +class ConsumerProducerTransactionTests { @Autowired private Config config;