Skip to content

Commit

Permalink
Kafka: replace deprecated poll method millis param with Duration (tes…
Browse files Browse the repository at this point in the history
  • Loading branch information
nshipyakov authored and quincy committed May 28, 2020
1 parent a8db4bb commit f775161
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -13,6 +13,7 @@
import org.junit.Test;
import org.rnorth.ducttape.unreliables.Unreliables;

import java.time.Duration;
import java.util.Arrays;
import java.util.UUID;
import java.util.concurrent.TimeUnit;
Expand Down Expand Up @@ -100,7 +101,7 @@ protected void testKafkaFunctionality(String bootstrapServers) throws Exception
producer.send(new ProducerRecord<>(topicName, "testcontainers", "rulezzz")).get();

Unreliables.retryUntilTrue(10, TimeUnit.SECONDS, () -> {
ConsumerRecords<String, String> records = consumer.poll(100);
ConsumerRecords<String, String> records = consumer.poll(Duration.ofMillis(100));

if (records.isEmpty()) {
return false;
Expand Down

0 comments on commit f775161

Please sign in to comment.