diff --git a/settings.gradle b/settings.gradle index 891b638d..e711bac0 100644 --- a/settings.gradle +++ b/settings.gradle @@ -37,3 +37,4 @@ include 'spring-pulsar-sample-apps:sample-reactive' include 'spring-pulsar-sample-apps:sample-pulsar-binder' include 'spring-pulsar-docs' include 'spring-pulsar-spring-cloud-stream-binder' +include 'spring-pulsar-test' diff --git a/spring-pulsar-spring-boot-autoconfigure/build.gradle b/spring-pulsar-spring-boot-autoconfigure/build.gradle index 090636a6..dbf13868 100644 --- a/spring-pulsar-spring-boot-autoconfigure/build.gradle +++ b/spring-pulsar-spring-boot-autoconfigure/build.gradle @@ -22,6 +22,7 @@ dependencies { testImplementation 'org.springframework.boot:spring-boot-starter-web' testImplementation 'org.testcontainers:junit-jupiter' testImplementation 'org.testcontainers:pulsar' + testImplementation project(':spring-pulsar-test') // used by PulsarFunctionTests testImplementation 'org.testcontainers:rabbitmq' testImplementation 'org.springframework.boot:spring-boot-starter-amqp' diff --git a/spring-pulsar-spring-boot-autoconfigure/src/test/java/org/springframework/pulsar/autoconfigure/PulsarFunctionAdministrationIntegrationTests.java b/spring-pulsar-spring-boot-autoconfigure/src/test/java/org/springframework/pulsar/autoconfigure/PulsarFunctionAdministrationIntegrationTests.java index c3be8aba..d418c649 100644 --- a/spring-pulsar-spring-boot-autoconfigure/src/test/java/org/springframework/pulsar/autoconfigure/PulsarFunctionAdministrationIntegrationTests.java +++ b/spring-pulsar-spring-boot-autoconfigure/src/test/java/org/springframework/pulsar/autoconfigure/PulsarFunctionAdministrationIntegrationTests.java @@ -62,6 +62,7 @@ import org.springframework.pulsar.annotation.PulsarListener; import org.springframework.pulsar.function.PulsarFunctionAdministration; import org.springframework.pulsar.function.PulsarFunctionOperations.FunctionStopPolicy; import org.springframework.pulsar.function.PulsarSource; +import org.springframework.pulsar.test.support.PulsarTestContainerSupport; /** * Integration tests for {@link PulsarFunctionAdministration}. diff --git a/spring-pulsar-spring-boot-autoconfigure/src/test/java/org/springframework/pulsar/autoconfigure/PulsarListenerTests.java b/spring-pulsar-spring-boot-autoconfigure/src/test/java/org/springframework/pulsar/autoconfigure/PulsarListenerTests.java index eb02963f..e5315f59 100644 --- a/spring-pulsar-spring-boot-autoconfigure/src/test/java/org/springframework/pulsar/autoconfigure/PulsarListenerTests.java +++ b/spring-pulsar-spring-boot-autoconfigure/src/test/java/org/springframework/pulsar/autoconfigure/PulsarListenerTests.java @@ -37,6 +37,7 @@ import org.springframework.pulsar.annotation.PulsarListener; import org.springframework.pulsar.core.DefaultSchemaResolver; import org.springframework.pulsar.core.PulsarTemplate; import org.springframework.pulsar.core.SchemaResolver; +import org.springframework.pulsar.test.support.PulsarTestContainerSupport; /** * Tests for {@link PulsarListener}. diff --git a/spring-pulsar-spring-boot-autoconfigure/src/test/java/org/springframework/pulsar/autoconfigure/ReactivePulsarListenerTests.java b/spring-pulsar-spring-boot-autoconfigure/src/test/java/org/springframework/pulsar/autoconfigure/ReactivePulsarListenerTests.java index f864c4b7..2990e4dd 100644 --- a/spring-pulsar-spring-boot-autoconfigure/src/test/java/org/springframework/pulsar/autoconfigure/ReactivePulsarListenerTests.java +++ b/spring-pulsar-spring-boot-autoconfigure/src/test/java/org/springframework/pulsar/autoconfigure/ReactivePulsarListenerTests.java @@ -43,6 +43,7 @@ import org.springframework.pulsar.core.SchemaResolver; import org.springframework.pulsar.reactive.config.annotation.ReactivePulsarListener; import org.springframework.pulsar.reactive.core.ReactiveMessageConsumerBuilderCustomizer; import org.springframework.pulsar.reactive.core.ReactivePulsarTemplate; +import org.springframework.pulsar.test.support.PulsarTestContainerSupport; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; diff --git a/spring-pulsar-spring-boot-autoconfigure/src/test/java/org/springframework/pulsar/autoconfigure/SpringPulsarBootAppSanityTests.java b/spring-pulsar-spring-boot-autoconfigure/src/test/java/org/springframework/pulsar/autoconfigure/SpringPulsarBootAppSanityTests.java index 4687a82c..52cd6874 100644 --- a/spring-pulsar-spring-boot-autoconfigure/src/test/java/org/springframework/pulsar/autoconfigure/SpringPulsarBootAppSanityTests.java +++ b/spring-pulsar-spring-boot-autoconfigure/src/test/java/org/springframework/pulsar/autoconfigure/SpringPulsarBootAppSanityTests.java @@ -31,6 +31,7 @@ import org.springframework.boot.test.context.SpringBootTest.WebEnvironment; import org.springframework.boot.test.web.client.TestRestTemplate; import org.springframework.pulsar.autoconfigure.SpringPulsarBootAppSanityTests.SpringPulsarBootTestApp; import org.springframework.pulsar.core.PulsarTemplate; +import org.springframework.pulsar.test.support.PulsarTestContainerSupport; import org.springframework.test.context.DynamicPropertyRegistry; import org.springframework.test.context.DynamicPropertySource; import org.springframework.web.bind.annotation.GetMapping; diff --git a/spring-pulsar-spring-cloud-stream-binder/build.gradle b/spring-pulsar-spring-cloud-stream-binder/build.gradle index c93e5706..9891c643 100644 --- a/spring-pulsar-spring-cloud-stream-binder/build.gradle +++ b/spring-pulsar-spring-cloud-stream-binder/build.gradle @@ -10,5 +10,6 @@ dependencies { exclude group: 'javax.activation', module: 'javax.activation-api' exclude group: 'javax.annotation', module: 'javax.annotation-api' } + testImplementation 'org.springframework.boot:spring-boot-starter-test' } diff --git a/spring-pulsar-spring-cloud-stream-binder/src/main/java/org/springframework/pulsar/spring/cloud/stream/binder/PulsarMessageChannelBinder.java b/spring-pulsar-spring-cloud-stream-binder/src/main/java/org/springframework/pulsar/spring/cloud/stream/binder/PulsarMessageChannelBinder.java index e88ed2f3..4e16e175 100644 --- a/spring-pulsar-spring-cloud-stream-binder/src/main/java/org/springframework/pulsar/spring/cloud/stream/binder/PulsarMessageChannelBinder.java +++ b/spring-pulsar-spring-cloud-stream-binder/src/main/java/org/springframework/pulsar/spring/cloud/stream/binder/PulsarMessageChannelBinder.java @@ -1,5 +1,5 @@ /* - * Copyright 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. diff --git a/spring-pulsar-spring-cloud-stream-binder/src/test/java/org/springframework/pulsar/spring/cloud/stream/binder/PulsarBinderTests.java b/spring-pulsar-spring-cloud-stream-binder/src/test/java/org/springframework/pulsar/spring/cloud/stream/binder/PulsarBinderTests.java new file mode 100644 index 00000000..f555e4e5 --- /dev/null +++ b/spring-pulsar-spring-cloud-stream-binder/src/test/java/org/springframework/pulsar/spring/cloud/stream/binder/PulsarBinderTests.java @@ -0,0 +1,28 @@ +/* + * Copyright 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. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.springframework.pulsar.spring.cloud.stream.binder; + +import org.junit.jupiter.api.Test; + +public class PulsarBinderTests { + + @Test + void testBasicBinding() { + + } + +} diff --git a/spring-pulsar-test/build.gradle b/spring-pulsar-test/build.gradle new file mode 100644 index 00000000..f9c3a99e --- /dev/null +++ b/spring-pulsar-test/build.gradle @@ -0,0 +1,18 @@ +plugins { + id 'org.springframework.pulsar.spring-module' +} + +description = 'Spring Pulsar Test Module' + +dependencies { + implementation 'org.testcontainers:pulsar' + implementation 'org.testcontainers:junit-jupiter' +} + +project.afterEvaluate { + project.tasks.publishArtifacts.enabled(false) + project.tasks.artifactoryPublish.enabled(false) + project.tasks.publishToOssrh.enabled(false) + project.tasks.publishMavenJavaPublicationToOssrhRepository.enabled(false) + project.tasks.publishAllPublicationsToOssrhRepository.enabled(false) +} diff --git a/spring-pulsar-spring-boot-autoconfigure/src/test/java/org/springframework/pulsar/autoconfigure/PulsarTestContainerSupport.java b/spring-pulsar-test/src/main/java/org/springframework/pulsar/test/support/PulsarTestContainerSupport.java similarity index 93% rename from spring-pulsar-spring-boot-autoconfigure/src/test/java/org/springframework/pulsar/autoconfigure/PulsarTestContainerSupport.java rename to spring-pulsar-test/src/main/java/org/springframework/pulsar/test/support/PulsarTestContainerSupport.java index 5c818444..d8901740 100644 --- a/spring-pulsar-spring-boot-autoconfigure/src/test/java/org/springframework/pulsar/autoconfigure/PulsarTestContainerSupport.java +++ b/spring-pulsar-test/src/main/java/org/springframework/pulsar/test/support/PulsarTestContainerSupport.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.pulsar.autoconfigure; +package org.springframework.pulsar.test.support; import java.util.Locale; @@ -46,6 +46,10 @@ public interface PulsarTestContainerSupport { return isRunningOnMacM1() ? getMacM1PulsarImage() : getStandardPulsarImage(); } + static String getHttpServiceUrl() { + return PULSAR_CONTAINER.getHttpServiceUrl(); + } + private static boolean isRunningOnMacM1() { String osName = System.getProperty("os.name").toLowerCase(Locale.ENGLISH); String osArchitecture = System.getProperty("os.arch").toLowerCase(Locale.ENGLISH); diff --git a/spring-pulsar/build.gradle b/spring-pulsar/build.gradle index 52719593..5c051586 100644 --- a/spring-pulsar/build.gradle +++ b/spring-pulsar/build.gradle @@ -35,8 +35,7 @@ dependencies { testImplementation 'org.mockito:mockito-junit-jupiter' testImplementation 'org.springframework:spring-test' testImplementation 'org.springframework.boot:spring-boot-test' - testImplementation 'org.testcontainers:junit-jupiter' - testImplementation 'org.testcontainers:pulsar' + testImplementation project(':spring-pulsar-test') } test { diff --git a/spring-pulsar/src/test/java/org/springframework/pulsar/core/ConsumerAcknowledgmentTests.java b/spring-pulsar/src/test/java/org/springframework/pulsar/core/ConsumerAcknowledgmentTests.java index bf714402..0eb32690 100644 --- a/spring-pulsar/src/test/java/org/springframework/pulsar/core/ConsumerAcknowledgmentTests.java +++ b/spring-pulsar/src/test/java/org/springframework/pulsar/core/ConsumerAcknowledgmentTests.java @@ -1,5 +1,5 @@ /* - * Copyright 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. @@ -55,6 +55,7 @@ import org.springframework.pulsar.listener.PulsarAcknowledgingMessageListener; import org.springframework.pulsar.listener.PulsarBatchMessageListener; import org.springframework.pulsar.listener.PulsarContainerProperties; import org.springframework.pulsar.listener.PulsarRecordMessageListener; +import org.springframework.pulsar.test.support.PulsarTestContainerSupport; /** * @author Soby Chacko diff --git a/spring-pulsar/src/test/java/org/springframework/pulsar/core/FailoverConsumerTests.java b/spring-pulsar/src/test/java/org/springframework/pulsar/core/FailoverConsumerTests.java index abf1491f..478d5788 100644 --- a/spring-pulsar/src/test/java/org/springframework/pulsar/core/FailoverConsumerTests.java +++ b/spring-pulsar/src/test/java/org/springframework/pulsar/core/FailoverConsumerTests.java @@ -1,5 +1,5 @@ /* - * Copyright 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. @@ -38,6 +38,7 @@ import org.junit.jupiter.api.Test; import org.springframework.pulsar.listener.DefaultPulsarMessageListenerContainer; import org.springframework.pulsar.listener.PulsarContainerProperties; import org.springframework.pulsar.listener.PulsarRecordMessageListener; +import org.springframework.pulsar.test.support.PulsarTestContainerSupport; /** * @author Soby Chacko diff --git a/spring-pulsar/src/test/java/org/springframework/pulsar/core/PulsarAdministrationTests.java b/spring-pulsar/src/test/java/org/springframework/pulsar/core/PulsarAdministrationTests.java index 93086690..dac82560 100644 --- a/spring-pulsar/src/test/java/org/springframework/pulsar/core/PulsarAdministrationTests.java +++ b/spring-pulsar/src/test/java/org/springframework/pulsar/core/PulsarAdministrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 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,6 +39,7 @@ import org.springframework.beans.factory.ObjectProvider; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import org.springframework.pulsar.test.support.PulsarTestContainerSupport; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit.jupiter.SpringExtension; diff --git a/spring-pulsar/src/test/java/org/springframework/pulsar/core/PulsarProducerFactoryTests.java b/spring-pulsar/src/test/java/org/springframework/pulsar/core/PulsarProducerFactoryTests.java index 4f71b5f8..e21d2db9 100644 --- a/spring-pulsar/src/test/java/org/springframework/pulsar/core/PulsarProducerFactoryTests.java +++ b/spring-pulsar/src/test/java/org/springframework/pulsar/core/PulsarProducerFactoryTests.java @@ -1,5 +1,5 @@ /* - * Copyright 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. @@ -38,6 +38,8 @@ import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import org.springframework.pulsar.test.support.PulsarTestContainerSupport; + /** * Common tests for {@link DefaultPulsarProducerFactory} and * {@link CachingPulsarProducerFactory}. diff --git a/spring-pulsar/src/test/java/org/springframework/pulsar/core/PulsarTemplateTests.java b/spring-pulsar/src/test/java/org/springframework/pulsar/core/PulsarTemplateTests.java index ba5051b1..977d7a4d 100644 --- a/spring-pulsar/src/test/java/org/springframework/pulsar/core/PulsarTemplateTests.java +++ b/spring-pulsar/src/test/java/org/springframework/pulsar/core/PulsarTemplateTests.java @@ -49,6 +49,7 @@ import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; import org.springframework.pulsar.core.PulsarOperations.SendMessageBuilder; +import org.springframework.pulsar.test.support.PulsarTestContainerSupport; /** * Tests for {@link PulsarTemplate}. diff --git a/spring-pulsar/src/test/java/org/springframework/pulsar/core/PulsarTestContainerSupport.java b/spring-pulsar/src/test/java/org/springframework/pulsar/core/PulsarTestContainerSupport.java deleted file mode 100644 index 1e77e70f..00000000 --- a/spring-pulsar/src/test/java/org/springframework/pulsar/core/PulsarTestContainerSupport.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright 2022 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.pulsar.core; - -import java.util.Locale; - -import org.junit.jupiter.api.BeforeAll; -import org.testcontainers.containers.PulsarContainer; -import org.testcontainers.junit.jupiter.Testcontainers; -import org.testcontainers.utility.DockerImageName; - -/** - * Provides a static {@link PulsarContainer} that can be shared across test classes. - * - * @author Chris Bono - */ -@Testcontainers(disabledWithoutDocker = true) -public interface PulsarTestContainerSupport { - - PulsarContainer PULSAR_CONTAINER = new PulsarContainer( - isRunningOnMacM1() ? getMacM1PulsarImage() : getStandardPulsarImage()); - - @BeforeAll - static void startContainer() { - PULSAR_CONTAINER.start(); - } - - static String getPulsarBrokerUrl() { - return PULSAR_CONTAINER.getPulsarBrokerUrl(); - } - - static String getHttpServiceUrl() { - return PULSAR_CONTAINER.getHttpServiceUrl(); - } - - private static boolean isRunningOnMacM1() { - String osName = System.getProperty("os.name").toLowerCase(Locale.ENGLISH); - String osArchitecture = System.getProperty("os.arch").toLowerCase(Locale.ENGLISH); - return osName.contains("mac") && osArchitecture.equals("aarch64"); - } - - private static DockerImageName getStandardPulsarImage() { - return DockerImageName.parse("apachepulsar/pulsar:2.10.1"); - } - - private static DockerImageName getMacM1PulsarImage() { - return DockerImageName.parse("kezhenxu94/pulsar").asCompatibleSubstituteFor("apachepulsar/pulsar"); - } - -} diff --git a/spring-pulsar/src/test/java/org/springframework/pulsar/listener/DefaultPulsarConsumerErrorHandlerTests.java b/spring-pulsar/src/test/java/org/springframework/pulsar/listener/DefaultPulsarConsumerErrorHandlerTests.java index bb8ce07c..172f123e 100644 --- a/spring-pulsar/src/test/java/org/springframework/pulsar/listener/DefaultPulsarConsumerErrorHandlerTests.java +++ b/spring-pulsar/src/test/java/org/springframework/pulsar/listener/DefaultPulsarConsumerErrorHandlerTests.java @@ -1,5 +1,5 @@ /* - * Copyright 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. @@ -45,8 +45,8 @@ import org.springframework.pulsar.core.DefaultPulsarConsumerFactory; import org.springframework.pulsar.core.DefaultPulsarProducerFactory; import org.springframework.pulsar.core.PulsarOperations; import org.springframework.pulsar.core.PulsarTemplate; -import org.springframework.pulsar.core.PulsarTestContainerSupport; import org.springframework.pulsar.core.TypedMessageBuilderCustomizer; +import org.springframework.pulsar.test.support.PulsarTestContainerSupport; import org.springframework.util.backoff.FixedBackOff; /** diff --git a/spring-pulsar/src/test/java/org/springframework/pulsar/listener/DefaultPulsarMessageListenerContainerTests.java b/spring-pulsar/src/test/java/org/springframework/pulsar/listener/DefaultPulsarMessageListenerContainerTests.java index cb8893d7..c8033d88 100644 --- a/spring-pulsar/src/test/java/org/springframework/pulsar/listener/DefaultPulsarMessageListenerContainerTests.java +++ b/spring-pulsar/src/test/java/org/springframework/pulsar/listener/DefaultPulsarMessageListenerContainerTests.java @@ -1,5 +1,5 @@ /* - * Copyright 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. @@ -48,7 +48,7 @@ import org.springframework.pulsar.core.ConsumerTestUtils; import org.springframework.pulsar.core.DefaultPulsarConsumerFactory; import org.springframework.pulsar.core.DefaultPulsarProducerFactory; import org.springframework.pulsar.core.PulsarTemplate; -import org.springframework.pulsar.core.PulsarTestContainerSupport; +import org.springframework.pulsar.test.support.PulsarTestContainerSupport; /** * @author Soby Chacko diff --git a/spring-pulsar/src/test/java/org/springframework/pulsar/listener/PulsarListenerTests.java b/spring-pulsar/src/test/java/org/springframework/pulsar/listener/PulsarListenerTests.java index ecfa80de..8243a5cf 100644 --- a/spring-pulsar/src/test/java/org/springframework/pulsar/listener/PulsarListenerTests.java +++ b/spring-pulsar/src/test/java/org/springframework/pulsar/listener/PulsarListenerTests.java @@ -69,10 +69,10 @@ import org.springframework.pulsar.core.PulsarAdministration; import org.springframework.pulsar.core.PulsarConsumerFactory; import org.springframework.pulsar.core.PulsarProducerFactory; import org.springframework.pulsar.core.PulsarTemplate; -import org.springframework.pulsar.core.PulsarTestContainerSupport; import org.springframework.pulsar.core.PulsarTopic; import org.springframework.pulsar.core.SchemaResolver; import org.springframework.pulsar.support.PulsarHeaders; +import org.springframework.pulsar.test.support.PulsarTestContainerSupport; import org.springframework.test.annotation.DirtiesContext; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit.jupiter.SpringJUnitConfig; diff --git a/spring-pulsar/src/test/java/org/springframework/pulsar/observation/ObservationIntegrationTests.java b/spring-pulsar/src/test/java/org/springframework/pulsar/observation/ObservationIntegrationTests.java index c9e568d9..09d0d6cb 100644 --- a/spring-pulsar/src/test/java/org/springframework/pulsar/observation/ObservationIntegrationTests.java +++ b/spring-pulsar/src/test/java/org/springframework/pulsar/observation/ObservationIntegrationTests.java @@ -45,8 +45,8 @@ import org.springframework.pulsar.core.PulsarAdministration; import org.springframework.pulsar.core.PulsarConsumerFactory; import org.springframework.pulsar.core.PulsarProducerFactory; import org.springframework.pulsar.core.PulsarTemplate; -import org.springframework.pulsar.core.PulsarTestContainerSupport; import org.springframework.pulsar.listener.PulsarContainerProperties; +import org.springframework.pulsar.test.support.PulsarTestContainerSupport; import io.micrometer.common.KeyValues; import io.micrometer.core.tck.MeterRegistryAssert; diff --git a/spring-pulsar/src/test/java/org/springframework/pulsar/observation/ObservationTests.java b/spring-pulsar/src/test/java/org/springframework/pulsar/observation/ObservationTests.java index ed00f79f..c3bf7a93 100644 --- a/spring-pulsar/src/test/java/org/springframework/pulsar/observation/ObservationTests.java +++ b/spring-pulsar/src/test/java/org/springframework/pulsar/observation/ObservationTests.java @@ -50,8 +50,8 @@ import org.springframework.pulsar.core.PulsarAdministration; import org.springframework.pulsar.core.PulsarConsumerFactory; import org.springframework.pulsar.core.PulsarProducerFactory; import org.springframework.pulsar.core.PulsarTemplate; -import org.springframework.pulsar.core.PulsarTestContainerSupport; import org.springframework.pulsar.listener.PulsarContainerProperties; +import org.springframework.pulsar.test.support.PulsarTestContainerSupport; import org.springframework.test.annotation.DirtiesContext; import org.springframework.test.context.junit.jupiter.SpringJUnitConfig;