KAFKA-8118; Ensure ZK clients are closed in tests, fix verification (#6456)
We verify that ZK clients are closed in tests since these can affect subsequent tests and that makes it hard to debug test failures. But because of changes to ZooKeeper client, we were checking the wrong thread name. The thread name used now is <creatorThreadName>-EventThread where creatorThreadName varies depending on the test. Fixed ZooKeeperTestHarness to check this format and fixed tests which were leaving ZK clients behind. Also added a test to make sure we can detect changes to the thread name when we update ZK clients in future. Reviewers: Ismael Juma <ismael@juma.me.uk>, Manikumar Reddy <manikumar.reddy@gmail.com>
Showing
- core/src/test/scala/unit/kafka/zk/ZooKeeperTestHarness.scala 2 additions, 2 deletionscore/src/test/scala/unit/kafka/zk/ZooKeeperTestHarness.scala
- core/src/test/scala/unit/kafka/zookeeper/ZooKeeperClientTest.scala 20 additions, 10 deletions...test/scala/unit/kafka/zookeeper/ZooKeeperClientTest.scala
Please register or sign in to comment