[
https://issues.apache.org/jira/browse/ZOOKEEPER-2182?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Chris Nauroth updated ZOOKEEPER-2182:
-------------------------------------
Attachment: ZOOKEEPER-2182.001.patch
As per the contribution wiki, test suite classes must end with "Test" in the
class name.
http://wiki.apache.org/hadoop/ZooKeeper/HowToContribute
I'm attaching a patch. It looks big, but it's a straightforward change. It's
just {{git mv X.java XTest.java}}, followed by updating the class name within
the file.
There is one more small change in {{ClientRetryTest}}. It turns out this test
had a bug that was causing it to fail. It's probably been this way for a very
long time. The test is trying to cover the case of client connections getting
rejected for exceeding max server connections, then validating that the client
connection can proceed after one of the other existing client connections is
closed. It never actually closed a client though, so I added a close call:
{code}
cdw1.reset();
zk.close(); // <-- I added this line.
cdw1.waitForDisconnected(CONNECTION_TIMEOUT);
{code}
> Several test suites are not running during pre-commit, because their names do
> not end with "Test".
> --------------------------------------------------------------------------------------------------
>
> Key: ZOOKEEPER-2182
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2182
> Project: ZooKeeper
> Issue Type: Bug
> Components: tests
> Reporter: Chris Nauroth
> Assignee: Chris Nauroth
> Attachments: ZOOKEEPER-2182.001.patch
>
>
> In build.xml, the {{<junit>}} task definition uses an include pattern of
> {{\*\*/\*$\{test.category\}Test.java}}. This is important so that we don't
> accidentally try to run utility classes like {{PortAssignment}} or
> {{TestableZooKeeper}} as if they were JUnit suites. However, several test
> suites are misnamed so that they don't satisfy this pattern, and therefore
> pre-commit hasn't been running them.
> {{ClientRetry}}
> {{ReconfigFailureCases}}
> {{WatchEventWhenAutoReset}}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)