diff options
author | Josh Rosen <joshrosen@databricks.com> | 2015-11-20 14:31:26 -0800 |
---|---|---|
committer | Josh Rosen <joshrosen@databricks.com> | 2015-11-20 14:31:26 -0800 |
commit | 89fd9bd06160fa89dedbf685bfe159ffe4a06ec6 (patch) | |
tree | 1ae829b6427f41b226f90ab7eddc5094d95d71b9 /R | |
parent | be7a2cfd978143f6f265eca63e9e24f755bc9f22 (diff) | |
download | spark-89fd9bd06160fa89dedbf685bfe159ffe4a06ec6.tar.gz spark-89fd9bd06160fa89dedbf685bfe159ffe4a06ec6.tar.bz2 spark-89fd9bd06160fa89dedbf685bfe159ffe4a06ec6.zip |
[SPARK-11887] Close PersistenceEngine at the end of PersistenceEngineSuite tests
In PersistenceEngineSuite, we do not call `close()` on the PersistenceEngine at the end of the test. For the ZooKeeperPersistenceEngine, this causes us to leak a ZooKeeper client, causing the logs of unrelated tests to be periodically spammed with connection error messages from that client:
```
15/11/20 05:13:35.789 pool-1-thread-1-ScalaTest-running-PersistenceEngineSuite-SendThread(localhost:15741) INFO ClientCnxn: Opening socket connection to server localhost/127.0.0.1:15741. Will not attempt to authenticate using SASL (unknown error)
15/11/20 05:13:35.790 pool-1-thread-1-ScalaTest-running-PersistenceEngineSuite-SendThread(localhost:15741) WARN ClientCnxn: Session 0x15124ff48dd0000 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)
at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:350)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1068)
```
This patch fixes this by using a `finally` block.
Author: Josh Rosen <joshrosen@databricks.com>
Closes #9864 from JoshRosen/close-zookeeper-client-in-tests.
Diffstat (limited to 'R')
0 files changed, 0 insertions, 0 deletions