[SPARK-11887] Close PersistenceEngine at the end of PersistenceEngineSuite tests#9864
Closed
JoshRosen wants to merge 1 commit into
Closed
[SPARK-11887] Close PersistenceEngine at the end of PersistenceEngineSuite tests#9864JoshRosen wants to merge 1 commit into
JoshRosen wants to merge 1 commit into
Conversation
Contributor
Author
|
Reviewable's diff makes it clear that this patch is 99% whitespace changes: https://reviewable.io/reviews/apache/spark/9864 |
|
Test build #46428 has finished for PR 9864 at commit
|
Contributor
Author
|
/cc @zsxwing for review. |
Contributor
Author
|
You can look at https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/46428/artifact/core/target/ to see that this ended up fixing those spurious log messages. |
Member
You can also use https://github.com/apache/spark/pull/9864/files?w=1 to ignore space changes :) |
Member
|
LGTM |
Contributor
Author
|
Woah, cool! I didn't know about that GitHub feature. I'm going to merge this into master and branch-1.6. |
asfgit
pushed a commit
that referenced
this pull request
Nov 20, 2015
…Suite 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. (cherry picked from commit 89fd9bd) Signed-off-by: Josh Rosen <joshrosen@databricks.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:This patch fixes this by using a
finallyblock.