This is an automated email from the ASF dual-hosted git repository.
ijuma 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 9ad7bce MINOR: Close ZKDatabase in EmbeddedZookeeper (#6237)
9ad7bce is described below
commit 9ad7bce492869e7d971bb7c83becf795622fa4dd
Author: Arlo Louis O'Keeffe <[email protected]>
AuthorDate: Sun Jul 28 08:35:25 2019 +0200
MINOR: Close ZKDatabase in EmbeddedZookeeper (#6237)
And remove redundant call. Closing ZKDatabase is necessary to allow the data
directory to be deleted when running on Windows.
Reviewers: Ismael Juma <[email protected]>
---
core/src/test/scala/unit/kafka/zk/EmbeddedZookeeper.scala | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/core/src/test/scala/unit/kafka/zk/EmbeddedZookeeper.scala
b/core/src/test/scala/unit/kafka/zk/EmbeddedZookeeper.scala
index 288b62e..28b592e 100755
--- a/core/src/test/scala/unit/kafka/zk/EmbeddedZookeeper.scala
+++ b/core/src/test/scala/unit/kafka/zk/EmbeddedZookeeper.scala
@@ -49,7 +49,7 @@ class EmbeddedZookeeper() extends Logging {
val port = zookeeper.getClientPort
def shutdown(): Unit = {
- CoreUtils.swallow(zookeeper.shutdown(), this)
+ // Also shuts down ZooKeeperServer
CoreUtils.swallow(factory.shutdown(), this)
def isDown(): Boolean = {
@@ -60,6 +60,7 @@ class EmbeddedZookeeper() extends Logging {
}
Iterator.continually(isDown()).exists(identity)
+ CoreUtils.swallow(zookeeper.getZKDatabase().close(), this)
Utils.delete(logDir)
Utils.delete(snapshotDir)