|
41 | 41 |
|
42 | 42 | import org.springframework.boot.autoconfigure.pulsar.PulsarProperties.Consumer;
|
43 | 43 | import org.springframework.boot.autoconfigure.pulsar.PulsarProperties.Failover.BackupCluster;
|
44 |
| -import org.springframework.pulsar.config.ConcurrentPulsarListenerContainerFactory; |
45 | 44 | import org.springframework.pulsar.core.PulsarProducerFactory;
|
46 | 45 | import org.springframework.pulsar.core.PulsarTemplate;
|
47 | 46 | import org.springframework.pulsar.listener.PulsarContainerProperties;
|
@@ -264,29 +263,19 @@ void customizeContainerProperties() {
|
264 | 263 | properties.getConsumer().getSubscription().setType(SubscriptionType.Shared);
|
265 | 264 | properties.getConsumer().getSubscription().setName("my-subscription");
|
266 | 265 | properties.getListener().setSchemaType(SchemaType.AVRO);
|
| 266 | + properties.getListener().setConcurrency(10); |
267 | 267 | properties.getListener().setObservationEnabled(true);
|
268 | 268 | properties.getTransaction().setEnabled(true);
|
269 | 269 | PulsarContainerProperties containerProperties = new PulsarContainerProperties("my-topic-pattern");
|
270 | 270 | new PulsarPropertiesMapper(properties).customizeContainerProperties(containerProperties);
|
271 | 271 | assertThat(containerProperties.getSubscriptionType()).isEqualTo(SubscriptionType.Shared);
|
272 | 272 | assertThat(containerProperties.getSubscriptionName()).isEqualTo("my-subscription");
|
273 | 273 | assertThat(containerProperties.getSchemaType()).isEqualTo(SchemaType.AVRO);
|
| 274 | + assertThat(containerProperties.getConcurrency()).isEqualTo(10); |
274 | 275 | assertThat(containerProperties.isObservationEnabled()).isTrue();
|
275 | 276 | assertThat(containerProperties.transactions().isEnabled()).isTrue();
|
276 | 277 | }
|
277 | 278 |
|
278 |
| - @Test |
279 |
| - @SuppressWarnings("removal") |
280 |
| - void customizeConcurrentPulsarListenerContainerFactory() { |
281 |
| - PulsarProperties properties = new PulsarProperties(); |
282 |
| - properties.getListener().setConcurrency(10); |
283 |
| - ConcurrentPulsarListenerContainerFactory<?> listenerContainerFactory = mock( |
284 |
| - ConcurrentPulsarListenerContainerFactory.class); |
285 |
| - new PulsarPropertiesMapper(properties) |
286 |
| - .customizeConcurrentPulsarListenerContainerFactory(listenerContainerFactory); |
287 |
| - then(listenerContainerFactory).should().setConcurrency(10); |
288 |
| - } |
289 |
| - |
290 | 279 | @Test
|
291 | 280 | @SuppressWarnings("unchecked")
|
292 | 281 | void customizeReaderBuilder() {
|
|
0 commit comments