From d130b46110ec9f9796766b6071415adb152426d3 Mon Sep 17 00:00:00 2001 From: Soby Chacko Date: Wed, 8 Nov 2023 19:34:42 -0500 Subject: [PATCH] Test cleanup in Kafka binder modules Part of fixing https://github.com/spring-cloud/spring-cloud-stream/issues/2371. --- ...afkaBinderConfigurationPropertiesTest.java | 20 +-- .../KafkaTopicProvisionerTests.java | 6 +- .../stream/binder/kafka/AdminConfigTests.java | 4 +- .../kafka/AutoCreateTopicDisabledTests.java | 4 +- ...BinderAutoConfigurationPropertiesTest.java | 4 +- ...afkaBinderConfigurationPropertiesTest.java | 2 +- .../kafka/KafkaBinderConfigurationTest.java | 6 +- ...afkaBinderJaasInitializerListenerTest.java | 4 +- .../stream/binder/kafka/KafkaBinderTests.java | 124 +++++++++--------- .../binder/kafka/KafkaBinderUnitTests.java | 14 +- .../binder/kafka/KafkaTransactionTests.java | 2 +- .../KafkaBinderCustomHealthCheckTests.java | 2 +- .../KafkaBinderMeterRegistryTest.java | 4 +- .../integration/KafkaBinderActuatorTests.java | 4 +- .../KafkaBinderExtendedPropertiesTest.java | 2 +- .../integration/KafkaBindingServiceTests.java | 2 +- .../KafkaConfigCustomizationTests.java | 2 +- .../integration/KafkaNullConverterTest.java | 4 +- .../ProducerOnlyTransactionTests.java | 2 +- ...dKafkaBinderTopicPropertiesUpdateTest.java | 2 +- .../KafkaBinderTopicPropertiesUpdateTest.java | 2 +- .../ConsumerProducerTransactionTests.java | 2 +- 22 files changed, 109 insertions(+), 109 deletions(-) diff --git a/binders/kafka-binder/spring-cloud-stream-binder-kafka-core/src/test/java/org/springframework/cloud/stream/binder/kafka/properties/KafkaBinderConfigurationPropertiesTest.java b/binders/kafka-binder/spring-cloud-stream-binder-kafka-core/src/test/java/org/springframework/cloud/stream/binder/kafka/properties/KafkaBinderConfigurationPropertiesTest.java index 84102c2ac..3c72200eb 100644 --- a/binders/kafka-binder/spring-cloud-stream-binder-kafka-core/src/test/java/org/springframework/cloud/stream/binder/kafka/properties/KafkaBinderConfigurationPropertiesTest.java +++ b/binders/kafka-binder/spring-cloud-stream-binder-kafka-core/src/test/java/org/springframework/cloud/stream/binder/kafka/properties/KafkaBinderConfigurationPropertiesTest.java @@ -36,7 +36,7 @@ import static org.assertj.core.api.Assertions.assertThat; class KafkaBinderConfigurationPropertiesTest { @Test - public void mergedConsumerConfigurationFiltersGroupIdFromKafkaProperties() { + void mergedConsumerConfigurationFiltersGroupIdFromKafkaProperties() { KafkaProperties kafkaProperties = new KafkaProperties(); kafkaProperties.getConsumer().setGroupId("group1"); KafkaBinderConfigurationProperties kafkaBinderConfigurationProperties = @@ -49,7 +49,7 @@ class KafkaBinderConfigurationPropertiesTest { } @Test - public void mergedConsumerConfigurationFiltersEnableAutoCommitFromKafkaProperties() { + void mergedConsumerConfigurationFiltersEnableAutoCommitFromKafkaProperties() { KafkaProperties kafkaProperties = new KafkaProperties(); kafkaProperties.getConsumer().setEnableAutoCommit(true); KafkaBinderConfigurationProperties kafkaBinderConfigurationProperties = @@ -62,7 +62,7 @@ class KafkaBinderConfigurationPropertiesTest { } @Test - public void mergedConsumerConfigurationFiltersGroupIdFromKafkaBinderConfigurationPropertiesConfiguration() { + void mergedConsumerConfigurationFiltersGroupIdFromKafkaBinderConfigurationPropertiesConfiguration() { KafkaProperties kafkaProperties = new KafkaProperties(); KafkaBinderConfigurationProperties kafkaBinderConfigurationProperties = new KafkaBinderConfigurationProperties(kafkaProperties); @@ -75,7 +75,7 @@ class KafkaBinderConfigurationPropertiesTest { } @Test - public void mergedConsumerConfigurationFiltersEnableAutoCommitFromKafkaBinderConfigurationPropertiesConfiguration() { + void mergedConsumerConfigurationFiltersEnableAutoCommitFromKafkaBinderConfigurationPropertiesConfiguration() { KafkaProperties kafkaProperties = new KafkaProperties(); KafkaBinderConfigurationProperties kafkaBinderConfigurationProperties = new KafkaBinderConfigurationProperties(kafkaProperties); @@ -88,7 +88,7 @@ class KafkaBinderConfigurationPropertiesTest { } @Test - public void mergedConsumerConfigurationFiltersGroupIdFromKafkaBinderConfigurationPropertiesConsumerProperties() { + void mergedConsumerConfigurationFiltersGroupIdFromKafkaBinderConfigurationPropertiesConsumerProperties() { KafkaProperties kafkaProperties = new KafkaProperties(); KafkaBinderConfigurationProperties kafkaBinderConfigurationProperties = new KafkaBinderConfigurationProperties(kafkaProperties); @@ -101,7 +101,7 @@ class KafkaBinderConfigurationPropertiesTest { } @Test - public void mergedConsumerConfigurationFiltersEnableAutoCommitFromKafkaBinderConfigurationPropertiesConsumerProps() { + void mergedConsumerConfigurationFiltersEnableAutoCommitFromKafkaBinderConfigurationPropertiesConsumerProps() { KafkaProperties kafkaProperties = new KafkaProperties(); KafkaBinderConfigurationProperties kafkaBinderConfigurationProperties = new KafkaBinderConfigurationProperties(kafkaProperties); @@ -114,7 +114,7 @@ class KafkaBinderConfigurationPropertiesTest { } @Test - public void testCertificateFilesAreConvertedToAbsolutePathsFromClassPathResources() { + void certificateFilesAreConvertedToAbsolutePathsFromClassPathResources() { KafkaProperties kafkaProperties = new KafkaProperties(); KafkaBinderConfigurationProperties kafkaBinderConfigurationProperties = new KafkaBinderConfigurationProperties(kafkaProperties); @@ -132,7 +132,7 @@ class KafkaBinderConfigurationPropertiesTest { } @Test - public void testCertificateFilesAreConvertedToAbsolutePathsFromHttpResources() throws IOException { + void certificateFilesAreConvertedToAbsolutePathsFromHttpResources() throws IOException { HttpServer server = HttpServer.create(new InetSocketAddress("localhost", 5869), 0); createContextWithCertFileHandler(server, "testclient.truststore"); createContextWithCertFileHandler(server, "testclient.keystore"); @@ -164,7 +164,7 @@ class KafkaBinderConfigurationPropertiesTest { } @Test - public void testCertificateFilesAreConvertedToGivenAbsolutePathsFromClassPathResources() { + void certificateFilesAreConvertedToGivenAbsolutePathsFromClassPathResources() { KafkaProperties kafkaProperties = new KafkaProperties(); KafkaBinderConfigurationProperties kafkaBinderConfigurationProperties = new KafkaBinderConfigurationProperties(kafkaProperties); @@ -182,7 +182,7 @@ class KafkaBinderConfigurationPropertiesTest { } @Test - public void testCertificateFilesAreMovedForSchemaRegistryConfiguration() { + void certificateFilesAreMovedForSchemaRegistryConfiguration() { KafkaProperties kafkaProperties = new KafkaProperties(); KafkaBinderConfigurationProperties kafkaBinderConfigurationProperties = new KafkaBinderConfigurationProperties(kafkaProperties); diff --git a/binders/kafka-binder/spring-cloud-stream-binder-kafka-core/src/test/java/org/springframework/cloud/stream/binder/kafka/provisioning/KafkaTopicProvisionerTests.java b/binders/kafka-binder/spring-cloud-stream-binder-kafka-core/src/test/java/org/springframework/cloud/stream/binder/kafka/provisioning/KafkaTopicProvisionerTests.java index 80758fb50..bd76aa50e 100644 --- a/binders/kafka-binder/spring-cloud-stream-binder-kafka-core/src/test/java/org/springframework/cloud/stream/binder/kafka/provisioning/KafkaTopicProvisionerTests.java +++ b/binders/kafka-binder/spring-cloud-stream-binder-kafka-core/src/test/java/org/springframework/cloud/stream/binder/kafka/provisioning/KafkaTopicProvisionerTests.java @@ -46,7 +46,7 @@ class KafkaTopicProvisionerTests { @SuppressWarnings("rawtypes") @Test - public void bootPropertiesOverriddenExceptServers() throws Exception { + void bootPropertiesOverriddenExceptServers() throws Exception { KafkaProperties bootConfig = new KafkaProperties(); bootConfig.getProperties().put(CommonClientConfigs.SECURITY_PROTOCOL_CONFIG, "PLAINTEXT"); @@ -75,7 +75,7 @@ class KafkaTopicProvisionerTests { @SuppressWarnings("rawtypes") @Test - public void bootPropertiesOverriddenIncludingServers() throws Exception { + void bootPropertiesOverriddenIncludingServers() throws Exception { KafkaProperties bootConfig = new KafkaProperties(); bootConfig.getProperties().put(CommonClientConfigs.SECURITY_PROTOCOL_CONFIG, "PLAINTEXT"); @@ -102,7 +102,7 @@ class KafkaTopicProvisionerTests { } @Test - public void brokersInvalid() throws Exception { + void brokersInvalid() throws Exception { KafkaProperties bootConfig = new KafkaProperties(); KafkaBinderConfigurationProperties binderConfig = new KafkaBinderConfigurationProperties( bootConfig); 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 b2fc47c72..704b5b9a8 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 @@ -59,7 +59,7 @@ class AdminConfigTests { private KafkaMessageChannelBinder binder; @Test - void testConsumerTopicProperties() { + void consumerTopicProperties() { final KafkaConsumerProperties consumerProperties = this.binder .getExtendedConsumerProperties("secondInput"); final KafkaTopicProperties kafkaTopicProperties = consumerProperties.getTopic(); @@ -72,7 +72,7 @@ class AdminConfigTests { } @Test - void testProducerTopicProperties() { + void producerTopicProperties() { final KafkaProducerProperties producerProperties = this.binder .getExtendedProducerProperties("output"); final KafkaTopicProperties kafkaTopicProperties = producerProperties.getTopic(); 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 782dfd709..2b5b3c7d7 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 @@ -47,7 +47,7 @@ class AutoCreateTopicDisabledTests { private static final EmbeddedKafkaBroker embeddedKafka = EmbeddedKafkaCondition.getBroker(); @Test - void testAutoCreateTopicDisabledFailsOnConsumerIfTopicNonExistentOnBroker() { + void autoCreateTopicDisabledFailsOnConsumerIfTopicNonExistentOnBroker() { KafkaProperties kafkaProperties = new TestKafkaProperties(); kafkaProperties.setBootstrapServers(Collections @@ -76,7 +76,7 @@ class AutoCreateTopicDisabledTests { } @Test - void testAutoCreateTopicDisabledFailsOnProducerIfTopicNonExistentOnBroker() { + void autoCreateTopicDisabledFailsOnProducerIfTopicNonExistentOnBroker() { KafkaProperties kafkaProperties = new TestKafkaProperties(); kafkaProperties.setBootstrapServers(Collections 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 ca70537df..2fdd6d6b8 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 @@ -57,7 +57,7 @@ class KafkaBinderAutoConfigurationPropertiesTest { @Test @SuppressWarnings("unchecked") - void testKafkaBinderConfigurationWithKafkaProperties() throws Exception { + void kafkaBinderConfigurationWithKafkaProperties() throws Exception { assertThat(this.kafkaMessageChannelBinder).isNotNull(); ExtendedProducerProperties producerProperties = new ExtendedProducerProperties<>( new KafkaProducerProperties()); @@ -111,7 +111,7 @@ class KafkaBinderAutoConfigurationPropertiesTest { @Test @SuppressWarnings("unchecked") - void testKafkaHealthIndicatorProperties() { + void kafkaHealthIndicatorProperties() { assertThat(this.kafkaBinderHealthIndicator).isNotNull(); Field consumerFactoryField = ReflectionUtils.findField( KafkaBinderHealthIndicator.class, "consumerFactory", 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 fc3435900..95b6bd2bc 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 @@ -56,7 +56,7 @@ class KafkaBinderConfigurationPropertiesTest { @Test @SuppressWarnings("unchecked") - void testKafkaBinderConfigurationProperties() throws Exception { + void kafkaBinderConfigurationProperties() throws Exception { assertThat(this.kafkaMessageChannelBinder).isNotNull(); KafkaProducerProperties kafkaProducerProperties = new KafkaProducerProperties(); kafkaProducerProperties.setBufferSize(12345); diff --git a/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/KafkaBinderConfigurationTest.java b/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/KafkaBinderConfigurationTest.java index 05c455df0..1a4ee2f96 100644 --- a/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/KafkaBinderConfigurationTest.java +++ b/binders/kafka-binder/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/KafkaBinderConfigurationTest.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 @@ class KafkaBinderConfigurationTest { } @Test - public void testMultipleClientFactoryCustomizers() { + public void multipleClientFactoryCustomizers() { contextRunner.withUserConfiguration(ClientFactoryCustomizerConfigs.class) .run(context -> { assertThat(context).hasSingleBean(KafkaMessageChannelBinder.class); @@ -77,7 +77,7 @@ class KafkaBinderConfigurationTest { } @Test - public void testMultipleAdminClientConfigCustomizers() { + public void multipleAdminClientConfigCustomizers() { contextRunner.withUserConfiguration(AdminClientConfigCustomizerConfigs.class) .run(context -> { assertThat(context).hasSingleBean(KafkaTopicProvisioner.class); 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 33ee21bd0..526ccac5c 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 @@ -78,7 +78,7 @@ class KafkaBinderJaasInitializerListenerTest { } @Test - void testConfigurationParsedCorrectlyWithKafkaClientAndDefaultControlFlag() + void configurationParsedCorrectlyWithKafkaClientAndDefaultControlFlag() throws Exception { ConfigFile configFile = new ConfigFile( new ClassPathResource("jaas-sample-kafka-only.conf").getURI()); @@ -107,7 +107,7 @@ class KafkaBinderJaasInitializerListenerTest { } @Test - void testConfigurationParsedCorrectlyWithKafkaClientAndNonDefaultControlFlag() + void configurationParsedCorrectlyWithKafkaClientAndNonDefaultControlFlag() throws Exception { ConfigFile configFile = new ConfigFile( new ClassPathResource("jaas-sample-kafka-only.conf").getURI()); 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 6ac42e4bc..87356e43c 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 @@ -379,7 +379,7 @@ class KafkaBinderTests extends @SuppressWarnings({ "rawtypes", "unchecked" }) @Test - void testDefaultHeaderMapper() throws Exception { + void defaultHeaderMapper() throws Exception { Binder binder = getBinder(); BindingProperties producerBindingProperties = createProducerBindingProperties( @@ -438,7 +438,7 @@ class KafkaBinderTests extends @SuppressWarnings({ "rawtypes", "unchecked" }) @Test - void testCustomHeaderMapper() throws Exception { + void customHeaderMapper() throws Exception { KafkaBinderConfigurationProperties binderConfiguration = createConfigurationProperties(); binderConfiguration.setHeaderMapperBeanName("headerMapper"); @@ -517,7 +517,7 @@ class KafkaBinderTests extends @SuppressWarnings({ "rawtypes", "unchecked" }) @Test - void testWellKnownHeaderMapperWithBeanNameKafkaHeaderMapper() throws Exception { + void wellKnownHeaderMapperWithBeanNameKafkaHeaderMapper() throws Exception { KafkaBinderConfigurationProperties binderConfiguration = createConfigurationProperties(); @@ -1050,37 +1050,37 @@ class KafkaBinderTests extends } @Test - void testDlqAndRetry() throws Exception { + void dlqAndRetry() throws Exception { testDlqGuts(true, null, null, false, false); } @Test - void testDlqAndRetryTransactional() throws Exception { + void dlqAndRetryTransactional() throws Exception { testDlqGuts(true, null, null, true, false); } @Test - void testDlq() throws Exception { + void dlq() throws Exception { testDlqGuts(false, null, 3, false, false); } @Test - void testDlqWithDlqDestinationResolver() throws Exception { + void dlqWithDlqDestinationResolver() throws Exception { testDlqGuts(false, null, 3, false, true); } @Test - void testDlqTransactional() throws Exception { + void dlqTransactional() throws Exception { testDlqGuts(false, null, 3, true, false); } @Test - void testDlqNone() throws Exception { + void dlqNone() throws Exception { testDlqGuts(false, HeaderMode.none, 1, false, false); } @Test - void testDlqEmbedded() throws Exception { + void dlqEmbedded() throws Exception { testDlqGuts(false, HeaderMode.embeddedHeaders, 3, false, false); } @@ -1317,7 +1317,7 @@ class KafkaBinderTests extends @Test @SuppressWarnings("unchecked") - void testDefaultAutoCommitOnErrorWithDlq() throws Exception { + void defaultAutoCommitOnErrorWithDlq() throws Exception { Binder binder = getBinder(); ExtendedProducerProperties producerProperties = createProducerProperties(); BindingProperties producerBindingProperties = createProducerBindingProperties( @@ -1394,7 +1394,7 @@ class KafkaBinderTests extends @Test @SuppressWarnings("unchecked") - void testRetriesWithoutDlq() throws Exception { + void retriesWithoutDlq() throws Exception { Binder binder = getBinder(); ExtendedProducerProperties producerProperties = createProducerProperties(); BindingProperties producerBindingProperties = createProducerBindingProperties( @@ -1439,7 +1439,7 @@ class KafkaBinderTests extends @Test @SuppressWarnings("unchecked") - void testCommonErrorHandlerBeanNameOnConsumerBinding() throws Exception { + void commonErrorHandlerBeanNameOnConsumerBinding() throws Exception { Binder binder = getBinder(); ExtendedProducerProperties producerProperties = createProducerProperties(); BindingProperties producerBindingProperties = createProducerBindingProperties( @@ -1502,7 +1502,7 @@ class KafkaBinderTests extends //See https://github.com/spring-cloud/spring-cloud-stream-binder-kafka/issues/870 for motivation for this test. @Test @SuppressWarnings("unchecked") - void testAutoCommitOnErrorWhenManualAcknowledgement() throws Exception { + void autoCommitOnErrorWhenManualAcknowledgement() throws Exception { Binder binder = getBinder(); ExtendedProducerProperties producerProperties = createProducerProperties(); BindingProperties producerBindingProperties = createProducerBindingProperties( @@ -1582,7 +1582,7 @@ class KafkaBinderTests extends @Test @SuppressWarnings("unchecked") - void testConfigurableDlqName() throws Exception { + void configurableDlqName() throws Exception { Binder binder = getBinder(); ExtendedProducerProperties producerProperties = createProducerProperties(); @@ -1661,7 +1661,7 @@ class KafkaBinderTests extends } @Test - public void testValidateKafkaTopicName() { + public void validateKafkaTopicName() { try { KafkaTopicUtils.validateTopicName("foo:bar"); fail("Expecting IllegalArgumentException"); @@ -1676,7 +1676,7 @@ class KafkaBinderTests extends // TODO: This test needs to be rethought - sending byte[] without explicit content // type // - yet being converted by the json converter - void testCompression() throws Exception { + void compression() throws Exception { final KafkaProducerProperties.CompressionType[] codecs = new KafkaProducerProperties.CompressionType[] { KafkaProducerProperties.CompressionType.none, KafkaProducerProperties.CompressionType.gzip, @@ -1729,7 +1729,7 @@ class KafkaBinderTests extends @Test @SuppressWarnings("unchecked") - void testEarliest() throws Exception { + void earliest() throws Exception { Binding producerBinding = null; Binding consumerBinding = null; @@ -1877,7 +1877,7 @@ class KafkaBinderTests extends @Test @SuppressWarnings("unchecked") - void testManualAckSucceedsWhenAutoCommitOffsetIsTurnedOff() throws Exception { + void manualAckSucceedsWhenAutoCommitOffsetIsTurnedOff() throws Exception { Binder binder = getBinder(); DirectChannel moduleOutputChannel = createBindableChannel("output", @@ -1923,7 +1923,7 @@ class KafkaBinderTests extends @Test @SuppressWarnings("unchecked") - void testManualAckIsNotPossibleWhenAutoCommitOffsetIsEnabledOnTheBinder() + void manualAckIsNotPossibleWhenAutoCommitOffsetIsEnabledOnTheBinder() throws Exception { Binder binder = getBinder(); @@ -2142,7 +2142,7 @@ class KafkaBinderTests extends @Test // @Override @SuppressWarnings({ "unchecked", "rawtypes" }) - void testPartitionedModuleJava() throws Exception { + void partitionedModuleJava() throws Exception { Binder binder = getBinder(); KafkaBinderConfigurationProperties configurationProperties = createConfigurationProperties(); @@ -2299,7 +2299,7 @@ class KafkaBinderTests extends @Test @SuppressWarnings("unchecked") - void testPartitionedModuleJavaWithRawMode() throws Exception { + void partitionedModuleJavaWithRawMode() throws Exception { Binder binder = getBinder(); ExtendedProducerProperties properties = createProducerProperties(); properties.setHeaderMode(HeaderMode.none); @@ -2362,7 +2362,7 @@ class KafkaBinderTests extends @Test @SuppressWarnings("unchecked") - void testPartitionedModuleSpELWithRawMode() throws Exception { + void partitionedModuleSpELWithRawMode() throws Exception { Binder binder = getBinder(); ExtendedProducerProperties properties = createProducerProperties(); properties.setPartitionKeyExpression( @@ -2434,7 +2434,7 @@ class KafkaBinderTests extends @Test @SuppressWarnings({ "unchecked", "rawtypes" }) - void testPartitionedNative() throws Exception { + void partitionedNative() throws Exception { Binder binder = getBinder(); ExtendedProducerProperties properties = createProducerProperties(); properties.setPartitionCount(6); @@ -2512,7 +2512,7 @@ class KafkaBinderTests extends @SuppressWarnings({ "rawtypes", "unchecked" }) @Test - void testAllowNonTransactionalProducerSetting() throws Exception { + void allowNonTransactionalProducerSetting() throws Exception { AbstractKafkaTestBinder binder = getBinder(); DirectChannel moduleOutputChannel = createBindableChannel("output", new BindingProperties()); @@ -2534,7 +2534,7 @@ class KafkaBinderTests extends @SuppressWarnings({ "rawtypes", "unchecked" }) @Test - void testProducerErrorChannel() throws Exception { + void producerErrorChannel() throws Exception { AbstractKafkaTestBinder binder = getBinder(); DirectChannel moduleOutputChannel = createBindableChannel("output", new BindingProperties()); @@ -2599,7 +2599,7 @@ class KafkaBinderTests extends @Test @SuppressWarnings("unchecked") - void testAutoCreateTopicsEnabledSucceeds() throws Exception { + void autoCreateTopicsEnabledSucceeds() throws Exception { KafkaBinderConfigurationProperties configurationProperties = createConfigurationProperties(); configurationProperties.setAutoCreateTopics(true); Binder binder = getBinder(configurationProperties); @@ -2615,7 +2615,7 @@ class KafkaBinderTests extends @Test @SuppressWarnings("unchecked") - void testCustomPartitionCountOverridesDefaultIfLarger() throws Exception { + void customPartitionCountOverridesDefaultIfLarger() throws Exception { var testPayload = new byte[2048]; Arrays.fill(testPayload, (byte) 65); KafkaBinderConfigurationProperties binderConfiguration = createConfigurationProperties(); @@ -2652,7 +2652,7 @@ class KafkaBinderTests extends @Test @SuppressWarnings("unchecked") - void testCustomPartitionCountDoesNotOverridePartitioningIfSmaller() + void customPartitionCountDoesNotOverridePartitioningIfSmaller() throws Exception { var testPayload = new byte[2048]; Arrays.fill(testPayload, (byte) 65); @@ -2690,7 +2690,7 @@ class KafkaBinderTests extends @Test @SuppressWarnings("unchecked") - void testDynamicKeyExpression() throws Exception { + void dynamicKeyExpression() throws Exception { Binder binder = getBinder(createConfigurationProperties()); var moduleInputChannel = new QueueChannel(); ExtendedProducerProperties producerProperties = createProducerProperties(); @@ -2724,7 +2724,7 @@ class KafkaBinderTests extends @Test @SuppressWarnings("unchecked") - void testCustomPartitionCountOverridesPartitioningIfLarger() throws Exception { + void customPartitionCountOverridesPartitioningIfLarger() throws Exception { var testPayload = new byte[2048]; Arrays.fill(testPayload, (byte) 65); KafkaBinderConfigurationProperties binderConfiguration = createConfigurationProperties(); @@ -2760,7 +2760,7 @@ class KafkaBinderTests extends @Test @SuppressWarnings("unchecked") - void testDefaultConsumerStartsAtEarliest() throws Exception { + void defaultConsumerStartsAtEarliest() throws Exception { Binder binder = getBinder(createConfigurationProperties()); BindingProperties producerBindingProperties = createProducerBindingProperties( @@ -2826,7 +2826,7 @@ class KafkaBinderTests extends @Test @SuppressWarnings("unchecked") - void testResume() throws Exception { + void resume() throws Exception { Binding producerBinding = null; Binding consumerBinding = null; @@ -2921,7 +2921,7 @@ class KafkaBinderTests extends @Test @SuppressWarnings("unchecked") - void testSyncProducerMetadata() throws Exception { + void syncProducerMetadata() throws Exception { Binder binder = getBinder(createConfigurationProperties()); var output = new DirectChannel(); String testTopicName = UUID.randomUUID().toString(); @@ -2941,7 +2941,7 @@ class KafkaBinderTests extends @Test @SuppressWarnings("unchecked") - void testSendTimeoutExpressionProducerMetadata() throws Exception { + void sendTimeoutExpressionProducerMetadata() throws Exception { Binder binder = getBinder(createConfigurationProperties()); var output = new DirectChannel(); String testTopicName = UUID.randomUUID().toString(); @@ -2963,7 +2963,7 @@ class KafkaBinderTests extends @Test @SuppressWarnings("unchecked") - void testAutoCreateTopicsDisabledOnBinderStillWorksAsLongAsBrokerCreatesTopic() + void autoCreateTopicsDisabledOnBinderStillWorksAsLongAsBrokerCreatesTopic() throws Exception { KafkaBinderConfigurationProperties configurationProperties = createConfigurationProperties(); configurationProperties.setAutoCreateTopics(false); @@ -3010,7 +3010,7 @@ class KafkaBinderTests extends @Test @SuppressWarnings("unchecked") - void testAutoConfigureTopicsDisabledSucceedsIfTopicExisting() + void autoConfigureTopicsDisabledSucceedsIfTopicExisting() throws Throwable { KafkaBinderConfigurationProperties configurationProperties = createConfigurationProperties(); @@ -3030,7 +3030,7 @@ class KafkaBinderTests extends @Test @SuppressWarnings("unchecked") - void testPartitionCountIncreasedIfAutoAddPartitionsSet() throws Throwable { + void partitionCountIncreasedIfAutoAddPartitionsSet() throws Throwable { KafkaBinderConfigurationProperties configurationProperties = createConfigurationProperties(); String testTopicName = "existing" + System.currentTimeMillis(); @@ -3049,7 +3049,7 @@ class KafkaBinderTests extends @Test @SuppressWarnings("unchecked") - void testAutoAddPartitionsDisabledSucceedsIfTopicUnderPartitionedAndAutoRebalanceEnabled() + void autoAddPartitionsDisabledSucceedsIfTopicUnderPartitionedAndAutoRebalanceEnabled() throws Throwable { KafkaBinderConfigurationProperties configurationProperties = createConfigurationProperties(); @@ -3076,7 +3076,7 @@ class KafkaBinderTests extends @Test @SuppressWarnings("unchecked") - void testAutoAddPartitionsDisabledFailsIfTopicUnderPartitionedAndAutoRebalanceDisabled() + void autoAddPartitionsDisabledFailsIfTopicUnderPartitionedAndAutoRebalanceDisabled() throws Throwable { KafkaBinderConfigurationProperties configurationProperties = createConfigurationProperties(); @@ -3105,7 +3105,7 @@ class KafkaBinderTests extends @Test @SuppressWarnings("unchecked") - void testAutoAddPartitionsDisabledSucceedsIfTopicPartitionedCorrectly() + void autoAddPartitionsDisabledSucceedsIfTopicPartitionedCorrectly() throws Throwable { Binding binding = null; try { @@ -3149,7 +3149,7 @@ class KafkaBinderTests extends @Test @SuppressWarnings("unchecked") - void testPartitionCountNotReduced() throws Throwable { + void partitionCountNotReduced() throws Throwable { String testTopicName = "existing" + System.currentTimeMillis(); KafkaBinderConfigurationProperties configurationProperties = createConfigurationProperties(); @@ -3173,7 +3173,7 @@ class KafkaBinderTests extends @Test @SuppressWarnings("unchecked") - void testConsumerDefaultDeserializer() throws Throwable { + void consumerDefaultDeserializer() throws Throwable { Binding binding = null; try { KafkaBinderConfigurationProperties configurationProperties = createConfigurationProperties(); @@ -3205,7 +3205,7 @@ class KafkaBinderTests extends @Test @SuppressWarnings("unchecked") - void testConsumerCustomDeserializer() throws Exception { + void consumerCustomDeserializer() throws Exception { Binding binding = null; try { KafkaBinderConfigurationProperties configurationProperties = createConfigurationProperties(); @@ -3244,7 +3244,7 @@ class KafkaBinderTests extends @Test @SuppressWarnings({ "unchecked", "rawtypes" }) - void testNativeSerializationWithCustomSerializerDeserializer() + void nativeSerializationWithCustomSerializerDeserializer() throws Exception { Binding producerBinding = null; Binding consumerBinding = null; @@ -3307,7 +3307,7 @@ class KafkaBinderTests extends @Test @SuppressWarnings({ "unchecked", "rawtypes" }) - void testNativeSerializationWithCustomSerializerDeserializerBytesPayload() + void nativeSerializationWithCustomSerializerDeserializerBytesPayload() throws Exception { Binding producerBinding = null; Binding consumerBinding = null; @@ -3366,7 +3366,7 @@ class KafkaBinderTests extends @Test @SuppressWarnings("unchecked") - void testBuiltinSerialization() throws Exception { + void builtinSerialization() throws Exception { Binding producerBinding = null; Binding consumerBinding = null; try { @@ -3529,7 +3529,7 @@ class KafkaBinderTests extends @SuppressWarnings({ "rawtypes", "unchecked" }) @Test - void testPolledConsumer() throws Exception { + void polledConsumer() throws Exception { KafkaTestBinder binder = getBinder(); PollableSource inboundBindTarget = new DefaultPollableMessageSource( this.messageConverter); @@ -3583,7 +3583,7 @@ class KafkaBinderTests extends @SuppressWarnings({ "rawtypes", "unchecked" }) @Test - void testPolledConsumerRequeue() throws Exception { + void polledConsumerRequeue() throws Exception { KafkaTestBinder binder = getBinder(); PollableSource inboundBindTarget = new DefaultPollableMessageSource( this.messageConverter); @@ -3617,7 +3617,7 @@ class KafkaBinderTests extends @SuppressWarnings({ "rawtypes", "unchecked" }) @Test - void testPolledConsumerWithDlq() throws Exception { + void polledConsumerWithDlq() throws Exception { KafkaTestBinder binder = getBinder(); PollableSource inboundBindTarget = new DefaultPollableMessageSource( this.messageConverter); @@ -3662,7 +3662,7 @@ class KafkaBinderTests extends @SuppressWarnings({ "rawtypes", "unchecked" }) @Test - void testTopicPatterns() throws Exception { + void topicPatterns() throws Exception { try (AdminClient admin = AdminClient.create( Collections.singletonMap(AdminClientConfig.BOOTSTRAP_SERVERS_CONFIG, embeddedKafka.getBrokersAsString()))) { @@ -3695,7 +3695,7 @@ class KafkaBinderTests extends } @Test - void testSameTopicCannotBeProvisionedAgain() throws Throwable { + void sameTopicCannotBeProvisionedAgain() throws Throwable { var latch = new CountDownLatch(1); try (AdminClient admin = AdminClient.create( Collections.singletonMap(AdminClientConfig.BOOTSTRAP_SERVERS_CONFIG, @@ -3719,7 +3719,7 @@ class KafkaBinderTests extends @Test @SuppressWarnings("unchecked") - void testResetOffsets() throws Exception { + void resetOffsets() throws Exception { Binding producerBinding = null; Binding consumerBinding = null; try { @@ -3793,7 +3793,7 @@ class KafkaBinderTests extends @Test @SuppressWarnings("unchecked") - void testRecordMetadata() throws Exception { + void recordMetadata() throws Exception { Binding producerBinding = null; try { String testPayload = "test"; @@ -3830,7 +3830,7 @@ class KafkaBinderTests extends @Test @SuppressWarnings("unchecked") - void testMessageKeyInPayload() throws Exception { + void messageKeyInPayload() throws Exception { Binding producerBinding = null; try { String testPayload = "test"; @@ -3867,17 +3867,17 @@ class KafkaBinderTests extends } @Test - void testInternalHeadersNotPropagated() throws Exception { + void internalHeadersNotPropagated() throws Exception { testInternalHeadersNotPropagatedGuts("propagate.1", null, null); } @Test - void testInternalHeadersNotPropagatedCustomHeader() throws Exception { + void internalHeadersNotPropagatedCustomHeader() throws Exception { testInternalHeadersNotPropagatedGuts("propagate.2", new String[] { "foo", "*" }, null); } @Test - void testInternalHeadersNotPropagatedCustomMapper() throws Exception { + void internalHeadersNotPropagatedCustomMapper() throws Exception { testInternalHeadersNotPropagatedGuts("propagate.3", null, new BinderHeaderMapper("*")); } @@ -3960,7 +3960,7 @@ class KafkaBinderTests extends } @Test - void testNoBrokerOverride() throws Exception { + void noBrokerOverride() throws Exception { Binder binder = getBinder(); ExtendedProducerProperties producerProperties = createProducerProperties(); producerProperties.getExtension().getConfiguration().put(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG, "foo"); @@ -3980,7 +3980,7 @@ class KafkaBinderTests extends } @Test - void testObservationEnabledOnTheBinder() throws Exception { + void observationEnabledOnTheBinder() throws Exception { KafkaBinderConfigurationProperties kafkaBinderConfigurationProperties = createConfigurationProperties(); kafkaBinderConfigurationProperties.setEnableObservation(true); AbstractKafkaTestBinder binder = getBinder(kafkaBinderConfigurationProperties); @@ -3990,7 +3990,7 @@ class KafkaBinderTests extends @SuppressWarnings("rawtypes") @Test - void testObservationEnabledThroughProducerMessageHandlerCustomizer() throws Exception { + void observationEnabledThroughProducerMessageHandlerCustomizer() throws Exception { AbstractKafkaTestBinder binder = getBinder(); KafkaMessageChannelBinder kafkaMessageChannelBinder = binder.getCoreBinder(); kafkaMessageChannelBinder.setProducerMessageHandlerCustomizer( @@ -4001,7 +4001,7 @@ class KafkaBinderTests extends } @Test - void testDynamicPartitionUpdates() throws Exception { + void dynamicPartitionUpdates() throws Exception { Binder binder = getBinder(); ExtendedProducerProperties properties = createProducerProperties(); properties.setPartitionKeyExpression( 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 1adf6ab30..4be06e858 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 @@ -73,7 +73,7 @@ import static org.mockito.Mockito.verify; class KafkaBinderUnitTests { @Test - void testPropertyOverrides() throws Exception { + void propertyOverrides() throws Exception { KafkaProperties kafkaProperties = new TestKafkaProperties(); KafkaBinderConfigurationProperties binderConfigurationProperties = new KafkaBinderConfigurationProperties( kafkaProperties); @@ -120,7 +120,7 @@ class KafkaBinderUnitTests { } @Test - void testMergedConsumerProperties() { + void mergedConsumerProperties() { KafkaProperties bootProps = new TestKafkaProperties(); bootProps.getConsumer().getProperties() .put(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, "bar"); @@ -137,7 +137,7 @@ class KafkaBinderUnitTests { } @Test - void testMergedProducerProperties() { + void mergedProducerProperties() { KafkaProperties bootProps = new TestKafkaProperties(); bootProps.getProducer().getProperties().put(ProducerConfig.RETRIES_CONFIG, "bar"); KafkaBinderConfigurationProperties props = new KafkaBinderConfigurationProperties( @@ -153,25 +153,25 @@ class KafkaBinderUnitTests { } @Test - void testOffsetResetWithGroupManagementEarliest() throws Exception { + void offsetResetWithGroupManagementEarliest() throws Exception { testOffsetResetWithGroupManagement(true, true, "foo-100", "testOffsetResetWithGroupManagementEarliest"); } @Test - void testOffsetResetWithGroupManagementLatest() throws Throwable { + void offsetResetWithGroupManagementLatest() throws Throwable { testOffsetResetWithGroupManagement(false, true, "foo-101", "testOffsetResetWithGroupManagementLatest"); } @Test - void testOffsetResetWithManualAssignmentEarliest() throws Exception { + void offsetResetWithManualAssignmentEarliest() throws Exception { testOffsetResetWithGroupManagement(true, false, "foo-102", "testOffsetResetWithManualAssignmentEarliest"); } @Test - void testOffsetResetWithGroupManualAssignmentLatest() throws Throwable { + void offsetResetWithGroupManualAssignmentLatest() throws Throwable { testOffsetResetWithGroupManagement(false, false, "foo-103", "testOffsetResetWithGroupManualAssignmentLatest"); } 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 5ca692e41..5d7cf826b 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 @@ -70,7 +70,7 @@ class KafkaTransactionTests { @SuppressWarnings({ "rawtypes", "unchecked" }) @Test - void testProducerRunsInTx() { + void producerRunsInTx() { KafkaProperties kafkaProperties = new TestKafkaProperties(); kafkaProperties.setBootstrapServers(Collections .singletonList(embeddedKafka.getBrokersAsString())); 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 3cdfab166..49a6e6321 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 @@ -49,7 +49,7 @@ class KafkaBinderCustomHealthCheckTests { } @Test - void testCustomHealthIndicatorIsActivated() { + void customHealthIndicatorIsActivated() { ConfigurableApplicationContext applicationContext = new SpringApplicationBuilder( CustomHealthCheckApplication.class).web(WebApplicationType.NONE).run( "--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/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 8224a0805..4b751d00b 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 @@ -71,7 +71,7 @@ class KafkaBinderMeterRegistryTest { } @Test - void testMetricsWithSingleBinder() throws Exception { + void metricsWithSingleBinder() throws Exception { ConfigurableApplicationContext applicationContext = new SpringApplicationBuilder(SimpleApplication.class) .web(WebApplicationType.NONE) .run("--spring.cloud.stream.bindings.uppercase-in-0.destination=inputTopic", @@ -99,7 +99,7 @@ class KafkaBinderMeterRegistryTest { } @Test - void testMetricsWithMultiBinders() { + void metricsWithMultiBinders() { ConfigurableApplicationContext applicationContext = new SpringApplicationBuilder(SimpleApplication.class) .web(WebApplicationType.NONE) .run("--spring.cloud.stream.bindings.uppercase-in-0.destination=inputTopic", 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 c54e8f7a6..f0b49f08e 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 @@ -78,7 +78,7 @@ class KafkaBinderActuatorTests { private KafkaTemplate kafkaTemplate; @Test - void testKafkaBinderMetricsExposed() { + void kafkaBinderMetricsExposed() { this.kafkaTemplate.send("input", null, "foo".getBytes()); this.kafkaTemplate.flush(); @@ -89,7 +89,7 @@ class KafkaBinderActuatorTests { @Test @Disabled - void testKafkaBinderMetricsWhenNoMicrometer() { + void kafkaBinderMetricsWhenNoMicrometer() { new ApplicationContextRunner().withUserConfiguration(KafkaMetricsTestConfig.class) .withPropertyValues( "spring.cloud.stream.bindings.input.group", KafkaBinderActuatorTests.TEST_CONSUMER_GROUP, 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 d94a85c15..cdf2076dc 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 @@ -76,7 +76,7 @@ class KafkaBinderExtendedPropertiesTest { private ConfigurableApplicationContext context; @Test - void testKafkaBinderExtendedProperties() throws Exception { + void kafkaBinderExtendedProperties() throws Exception { BinderFactory binderFactory = context.getBeanFactory() .getBean(BinderFactory.class); 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 c197bd7ac..ff2c84900 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 @@ -50,7 +50,7 @@ class KafkaBindingServiceTests { private ApplicationContext context; @Test - void testKafkaBinderOverridesBindingPartitionCountToTopicPartitionsIfHigher() { + void kafkaBinderOverridesBindingPartitionCountToTopicPartitionsIfHigher() { final StreamBridge streamBridge = this.context.getBean(StreamBridge.class); GenericMessage message = new GenericMessage<>("foo", Map.of("partitionKey", "key1")); streamBridge.send("kafka-binding-service-test", message); 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 3ed6c4a93..8921d7495 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 @@ -66,7 +66,7 @@ class KafkaConfigCustomizationTests { EmbeddedKafkaBroker embeddedKafkaBroker; @Test - void testBothConsumerAndProducerConfigsCanBeCustomized() throws InterruptedException { + void bothConsumerAndProducerConfigsCanBeCustomized() throws InterruptedException { Map producerProps = KafkaTestUtils .producerProps(embeddedKafkaBroker); KafkaTemplate template = new KafkaTemplate<>( 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 0a0f40482..90e1c51e2 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 @@ -59,7 +59,7 @@ class KafkaNullConverterTest { private KafkaNullConverterTestConfig config; @Test - void testKafkaNullConverterOutput() throws InterruptedException { + void kafkaNullConverterOutput() throws InterruptedException { final StreamBridge streamBridge = context.getBean(StreamBridge.class); streamBridge.send("kafkaNullOutput", new GenericMessage<>(KafkaNull.INSTANCE)); @@ -69,7 +69,7 @@ class KafkaNullConverterTest { } @Test - void testKafkaNullConverterInput() throws InterruptedException { + void kafkaNullConverterInput() throws InterruptedException { final MessageChannel kafkaNullInput = context.getBean("kafkaNullInput", MessageChannel.class); 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 6fa59fedd..32646d6c5 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 @@ -77,7 +77,7 @@ class ProducerOnlyTransactionTests { EmbeddedKafkaBroker embeddedKafkaBrokera; @Test - void testProducerTx() { + void producerTx() { final StreamBridge streamBridge = context.getBean(StreamBridge.class); this.sender.DoInTransaction(streamBridge); assertThat(this.sender.isInTx()).isTrue(); 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 5d6a2be97..a8a840af7 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 @@ -37,7 +37,7 @@ import static org.assertj.core.api.Assertions.assertThat; class DisabledKafkaBinderTopicPropertiesUpdateTest extends BaseKafkaBinderTopicPropertiesUpdateTest { @Test - void testKafkaBinderShouldNotUpdateTopicConfigurationOnDisabledFeature() throws Exception { + void kafkaBinderShouldNotUpdateTopicConfigurationOnDisabledFeature() throws Exception { Map adminClientConfig = new HashMap<>(); adminClientConfig.put(AdminClientConfig.BOOTSTRAP_SERVERS_CONFIG, embeddedKafka.getBrokersAsString()); AdminClient adminClient = AdminClient.create(adminClientConfig); 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 6629747ec..9c851cd68 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 @@ -40,7 +40,7 @@ import static org.assertj.core.api.Assertions.assertThat; class KafkaBinderTopicPropertiesUpdateTest extends BaseKafkaBinderTopicPropertiesUpdateTest { @Test - void testKafkaBinderUpdateTopicConfiguration() throws Exception { + void kafkaBinderUpdateTopicConfiguration() throws Exception { Map adminClientConfig = new HashMap<>(); adminClientConfig.put(AdminClientConfig.BOOTSTRAP_SERVERS_CONFIG, embeddedKafka.getBrokersAsString()); AdminClient adminClient = AdminClient.create(adminClientConfig); 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 1061af1a3..d783a39e6 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 @@ -84,7 +84,7 @@ class ConsumerProducerTransactionTests { private ApplicationContext context; @Test - public void testProducerRunsInConsumerTransaction() throws InterruptedException { + public void producerRunsInConsumerTransaction() throws InterruptedException { assertThat(this.config.latch.await(10, TimeUnit.SECONDS)).isTrue(); assertThat(this.config.outs).containsExactlyInAnyOrder("ONE", "THREE"); }