Added reactor-kafka autoconfig to spring.factories (#1943)

This commit is contained in:
Flaviu Mureșan
2021-05-08 14:14:57 +02:00
committed by GitHub
parent ac729f141d
commit 4070712f11
13 changed files with 266 additions and 8 deletions

View File

@@ -128,7 +128,7 @@ public abstract class KafkaConsumerTest implements TestTracingAwareSupplier {
kafkaProducer.send(producerRecord);
kafkaProducer.close();
await().atMost(Duration.ofSeconds(5)).until(() -> receivedCounter.intValue() == 1);
await().atMost(Duration.ofSeconds(15)).until(() -> receivedCounter.intValue() == 1);
BDDAssertions.then(this.tracer.currentSpan()).isNull();
BDDAssertions.then(this.spans).hasSize(1);

View File

@@ -129,7 +129,7 @@ public abstract class KafkaProducerTest implements TestTracingAwareSupplier {
ProducerRecord<String, String> producerRecord = new ProducerRecord<>(testTopic, "test", "test");
this.kafkaProducer.send(producerRecord, callback);
await().atMost(Duration.ofSeconds(5)).until(acknowledged::get);
await().atMost(Duration.ofSeconds(15)).until(acknowledged::get);
BDDAssertions.then(this.tracer.currentSpan()).isNull();
BDDAssertions.then(this.spans).hasSize(1);

View File

@@ -130,7 +130,7 @@ public abstract class KafkaReceiverTest implements TestTracingAwareSupplier {
ProducerRecord<String, String> producerRecord = new ProducerRecord<>(testTopic, "test", "test");
kafkaProducer.send(producerRecord);
await().atMost(Duration.ofSeconds(5)).until(() -> receivedCounter.intValue() == 1);
await().atMost(Duration.ofSeconds(15)).until(() -> receivedCounter.intValue() == 1);
BDDAssertions.then(this.tracer.currentSpan()).isNull();
BDDAssertions.then(this.spans).hasSize(1);

View File

@@ -134,7 +134,7 @@ public abstract class KafkaSenderTest implements TestTracingAwareSupplier {
Flux<SenderResult<Object>> senderResultFlux = this.kafkaSender
.send(Mono.just(SenderRecord.create(producerRecord, null)));
StepVerifier.create(senderResultFlux).expectNextCount(1).verifyComplete();
consumerRecords.poll(5, TimeUnit.SECONDS);
consumerRecords.poll(15, TimeUnit.SECONDS);
BDDAssertions.then(this.tracer.currentSpan()).isNull();
BDDAssertions.then(this.spans).hasSize(1);