mirror of https://github.com/apache/kafka.git
KAFKA-8817: Remove timeout for the whole test (#7313)
I bumped into this flaky test while working on another PR. It's a bit different from the reported PR, where it actually timed out at parsing localhost:port already. I think what we should really test is that the closing call can complete, so I removed the whole test timeout and add the timeout for the shutdown latch instead. Reviewers: Jason Gustafson <jason@confluent.io>, cpettitt-confluent <53191309+cpettitt-confluent@users.noreply.github.com>
This commit is contained in:
parent
7012fa3262
commit
a043edb559
|
|
@ -809,7 +809,7 @@ public class KafkaProducerTest {
|
|||
assertThrows(IllegalStateException.class, producer::initTransactions);
|
||||
}
|
||||
|
||||
@Test(timeout = 5000)
|
||||
@Test
|
||||
public void testCloseIsForcedOnPendingFindCoordinator() throws InterruptedException {
|
||||
Map<String, Object> configs = new HashMap<>();
|
||||
configs.put(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG, "localhost:9000");
|
||||
|
|
@ -834,10 +834,10 @@ public class KafkaProducerTest {
|
|||
|
||||
client.waitForRequests(1, 2000);
|
||||
producer.close(Duration.ofMillis(1000));
|
||||
assertionDoneLatch.await();
|
||||
assertionDoneLatch.await(5000, TimeUnit.MILLISECONDS);
|
||||
}
|
||||
|
||||
@Test(timeout = 5000)
|
||||
@Test
|
||||
public void testCloseIsForcedOnPendingInitProducerId() throws InterruptedException {
|
||||
Map<String, Object> configs = new HashMap<>();
|
||||
configs.put(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG, "localhost:9000");
|
||||
|
|
@ -863,10 +863,10 @@ public class KafkaProducerTest {
|
|||
|
||||
client.waitForRequests(1, 2000);
|
||||
producer.close(Duration.ofMillis(1000));
|
||||
assertionDoneLatch.await();
|
||||
assertionDoneLatch.await(5000, TimeUnit.MILLISECONDS);
|
||||
}
|
||||
|
||||
@Test(timeout = 5000)
|
||||
@Test
|
||||
public void testCloseIsForcedOnPendingAddOffsetRequest() throws InterruptedException {
|
||||
Map<String, Object> configs = new HashMap<>();
|
||||
configs.put(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG, "localhost:9000");
|
||||
|
|
@ -892,7 +892,7 @@ public class KafkaProducerTest {
|
|||
|
||||
client.waitForRequests(1, 2000);
|
||||
producer.close(Duration.ofMillis(1000));
|
||||
assertionDoneLatch.await();
|
||||
assertionDoneLatch.await(5000, TimeUnit.MILLISECONDS);
|
||||
}
|
||||
|
||||
private ProducerMetadata newMetadata(long refreshBackoffMs, long expirationMs) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue