This is an automated email from the ASF dual-hosted git repository. mjsax pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/kafka.git
The following commit(s) were added to refs/heads/trunk by this push: new f3e776fd345 MINOR: time-out hanging ZooKeeperClientTest (#14855) f3e776fd345 is described below commit f3e776fd3453a9ad2e58af453d229fc5c441935d Author: Lucas Brutschy <lbruts...@confluent.io> AuthorDate: Tue Nov 28 21:04:53 2023 +0100 MINOR: time-out hanging ZooKeeperClientTest (#14855) As described in KAFKA-9470, testBlockOnRequestCompletionFromStateChangeHandler will block for hours occasionally. If it passes, it takes 0.5 seconds, so a minute timeout should be safe. This is not a fix for KAFKA-9470, it's just aiming to make the CI more stable. Reviewers: David Jacot <dja...@confluent.io>, Matthias J. Sax <matth...@confluent.io> --- core/src/test/scala/unit/kafka/zookeeper/ZooKeeperClientTest.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/test/scala/unit/kafka/zookeeper/ZooKeeperClientTest.scala b/core/src/test/scala/unit/kafka/zookeeper/ZooKeeperClientTest.scala index 30bc5578296..ebb6ccf4453 100644 --- a/core/src/test/scala/unit/kafka/zookeeper/ZooKeeperClientTest.scala +++ b/core/src/test/scala/unit/kafka/zookeeper/ZooKeeperClientTest.scala @@ -20,7 +20,6 @@ import java.nio.charset.StandardCharsets import java.util.UUID import java.util.concurrent.atomic.{AtomicBoolean, AtomicInteger} import java.util.concurrent.{ArrayBlockingQueue, ConcurrentLinkedQueue, CountDownLatch, Executors, Semaphore, TimeUnit} - import scala.collection.Seq import com.yammer.metrics.core.{Gauge, Meter, MetricName} import kafka.server.KafkaConfig @@ -35,7 +34,7 @@ import org.apache.zookeeper.ZooKeeper.States import org.apache.zookeeper.client.ZKClientConfig import org.apache.zookeeper.{CreateMode, WatchedEvent, ZooDefs} import org.junit.jupiter.api.Assertions.{assertArrayEquals, assertEquals, assertFalse, assertThrows, assertTrue, fail} -import org.junit.jupiter.api.{AfterEach, BeforeEach, Test, TestInfo} +import org.junit.jupiter.api.{AfterEach, BeforeEach, Test, TestInfo, Timeout} import scala.jdk.CollectionConverters._ @@ -333,6 +332,7 @@ class ZooKeeperClientTest extends QuorumTestHarness { } @Test + @Timeout(60) def testBlockOnRequestCompletionFromStateChangeHandler(): Unit = { // This tests the scenario exposed by KAFKA-6879 in which the expiration callback awaits // completion of a request which is handled by another thread