GitHub user afine opened a pull request:
https://github.com/apache/zookeeper/pull/259
ZOOKEEPER-2786: Flaky test:
org.apache.zookeeper.test.ClientTest.testNonExistingOpCode
On branch 3.5, testNonExistingOpCode appears to always take 30 seconds to
execute (far too long):
https://builds.apache.org/job/ZooKeeper_branch35_jdk7/967/testReport/org.apache.zookeeper.test/ClientTest/testNonExistingOpCode/history/
The reason for this is a call to
`zk.testableWaitForShutdown(CONNECTION_TIMEOUT)` while waiting for the client
to disconnect after it sent a request with a bad opcode to the server. The call
to `testableWaitForShutdown` never actually asserts anything and effectively
just hangs for CONNECTION_TIMEOUT (30 seconds) and returns because the client
reconnects to the server.
This patch replaces `zk.testableWaitForShutdown(CONNECTION_TIMEOUT)` with
`watcher.waitForDisconnected(5000)` which is a better way to detect if we have
been disconnected.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/afine/zookeeper ZOOKEEPER-2786_br3.5
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/zookeeper/pull/259.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #259
----
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---