|
67 | 67 | import org.springframework.pulsar.core.PulsarProducerFactory;
|
68 | 68 | import org.springframework.pulsar.core.PulsarReaderFactory;
|
69 | 69 | import org.springframework.pulsar.core.PulsarTemplate;
|
70 |
| -import org.springframework.pulsar.core.PulsarTopicBuilder; |
71 | 70 | import org.springframework.pulsar.core.ReaderBuilderCustomizer;
|
72 | 71 | import org.springframework.pulsar.core.SchemaResolver;
|
73 | 72 | import org.springframework.pulsar.core.TopicResolver;
|
@@ -221,7 +220,8 @@ void injectsExpectedBeans() {
|
221 | 220 | .run((context) -> assertThat(context).getBean(DefaultPulsarProducerFactory.class)
|
222 | 221 | .hasFieldOrPropertyWithValue("pulsarClient", context.getBean(PulsarClient.class))
|
223 | 222 | .hasFieldOrPropertyWithValue("topicResolver", context.getBean(TopicResolver.class))
|
224 |
| - .hasFieldOrPropertyWithValue("topicBuilder", context.getBean(PulsarTopicBuilder.class))); |
| 223 | + .extracting("topicBuilder") |
| 224 | + .isNotNull()); // prototype so only check not-null |
225 | 225 | }
|
226 | 226 |
|
227 | 227 | @ParameterizedTest
|
@@ -378,7 +378,8 @@ void whenHasUserDefinedBeanDoesNotAutoConfigureBean() {
|
378 | 378 | void injectsExpectedBeans() {
|
379 | 379 | this.contextRunner.run((context) -> assertThat(context).getBean(DefaultPulsarConsumerFactory.class)
|
380 | 380 | .hasFieldOrPropertyWithValue("pulsarClient", context.getBean(PulsarClient.class))
|
381 |
| - .hasFieldOrPropertyWithValue("topicBuilder", context.getBean(PulsarTopicBuilder.class))); |
| 381 | + .extracting("topicBuilder") |
| 382 | + .isNotNull()); // prototype so only check not-null |
382 | 383 | }
|
383 | 384 |
|
384 | 385 | @Test
|
@@ -578,7 +579,8 @@ void whenHasUserDefinedBeanDoesNotAutoConfigureBean() {
|
578 | 579 | void injectsExpectedBeans() {
|
579 | 580 | this.contextRunner.run((context) -> assertThat(context).getBean(DefaultPulsarReaderFactory.class)
|
580 | 581 | .hasFieldOrPropertyWithValue("pulsarClient", context.getBean(PulsarClient.class))
|
581 |
| - .hasFieldOrPropertyWithValue("topicBuilder", context.getBean(PulsarTopicBuilder.class))); |
| 582 | + .extracting("topicBuilder") |
| 583 | + .isNotNull()); // prototype so only check not-null |
582 | 584 | }
|
583 | 585 |
|
584 | 586 | @Test
|
|
0 commit comments