[
https://issues.apache.org/jira/browse/ZOOKEEPER-1872?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13887497#comment-13887497
]
Raul Gutierrez Segales commented on ZOOKEEPER-1872:
---------------------------------------------------
Sorry for the late review, so feel free to ignore it if this ship has departed.
Some issues:
This looks weird:
{noformat}
+ for (int i = 0; i < numServers; i++) {
+ // checks to avoid unexpected cases
+ if (servers != null && servers.mt != null) {
+ if (i < servers.mt.length) {
+ servers.mt[i].shutdown();
+ }
+ }
+ }
{noformat}
can servers really become null while you are looping? Looks like the check
should be enough before the loop or otherwise we should synchronize around it?
Nit:
{noformat}
+ LOG.info("Starting peer " + peer.getId());
{noformat}
string extrapolation over concatenation (ditto for other calls to LOG.info &
friends).
In:
{noformat}
+ String failure = verifyThreadCount(peerList, 4);
+ if (failure != null) {
+ Assert.fail(failure);
+ }
{noformat}
simplify with:
{noformat}
+ String failure = verifyThreadCount(peerList, 4);
+ Assert.assertEquals(failure, failure, null);
{noformat}
ditto for the other recurrences of this construct.
> QuorumPeer is not shutdown in few cases
> ---------------------------------------
>
> Key: ZOOKEEPER-1872
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1872
> Project: ZooKeeper
> Issue Type: Sub-task
> Reporter: Rakesh R
> Assignee: Rakesh R
> Labels: test
> Fix For: 3.4.6, 3.5.0
>
> Attachments: ZOOKEEPER-1872.patch, ZOOKEEPER-1872.patch,
> ZOOKEEPER-1872.patch, ZOOKEEPER-1872.patch, ZOOKEEPER-1872_br3_4.patch
>
>
> Few cases are leaving quorumpeer running after the test case execution. Needs
> proper teardown for these.
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)