You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Rakesh R (Created) (JIRA)" <ji...@apache.org> on 2011/12/13 06:47:30 UTC

[jira] [Created] (ZOOKEEPER-1328) Misplaced assertion for the test case 'FLELostMessageTest' and not identifying misfunctions

Misplaced assertion for the test case 'FLELostMessageTest' and not identifying misfunctions
-------------------------------------------------------------------------------------------

                 Key: ZOOKEEPER-1328
                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1328
             Project: ZooKeeper
          Issue Type: Test
          Components: leaderElection
    Affects Versions: 3.4.0
            Reporter: Rakesh R
            Assignee: Rakesh R


Assertion for testLostMessage is kept inside the thread.run() method. Due to this the assertion failure will not be reflected in the main testcase. 
I have observed the test case is still passing in case of the assert failure or misfunction. Instead, the assertion can be moved to the test case - testLostMessage.

{noformat}
class LEThread extends Thread {
          public void run(){
                peer.setCurrentVote(v);
                LOG.info("Finished election: " + i + ", " + v.getId());
                Assert.assertTrue("State is not leading.", peer.getPeerState() == ServerState.LEADING);
             } 
{noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (ZOOKEEPER-1328) Misplaced assertion for the test case 'FLELostMessageTest' and not identifying misfunctions

Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-1328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13446055#comment-13446055 ] 

Hadoop QA commented on ZOOKEEPER-1328:
--------------------------------------

+1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12543228/ZOOKEEPER-1328.2.patch
  against trunk revision 1379123.

    +1 @author.  The patch does not contain any @author tags.

    +1 tests included.  The patch appears to include 9 new or modified tests.

    +1 javadoc.  The javadoc tool did not generate any warning messages.

    +1 javac.  The applied patch does not increase the total number of javac compiler warnings.

    +1 findbugs.  The patch does not introduce any new Findbugs (version 1.3.9) warnings.

    +1 release audit.  The applied patch does not increase the total number of release audit warnings.

    +1 core tests.  The patch passed core unit tests.

    +1 contrib tests.  The patch passed contrib unit tests.

Test results: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/1175//testReport/
Findbugs warnings: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/1175//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/1175//console

This message is automatically generated.
                
> Misplaced assertion for the test case 'FLELostMessageTest' and not identifying misfunctions
> -------------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1328
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1328
>             Project: ZooKeeper
>          Issue Type: Test
>          Components: leaderElection
>    Affects Versions: 3.4.0
>            Reporter: Rakesh R
>            Assignee: Rakesh R
>             Fix For: 3.5.0
>
>         Attachments: ZOOKEEPER-1328.1.patch, ZOOKEEPER-1328.2.patch, ZOOKEEPER-1328.patch
>
>
> Assertion for testLostMessage is kept inside the thread.run() method. Due to this the assertion failure will not be reflected in the main testcase. 
> I have observed the test case is still passing in case of the assert failure or misfunction. Instead, the assertion can be moved to the test case - testLostMessage.
> {noformat}
> class LEThread extends Thread {
>           public void run(){
>                 peer.setCurrentVote(v);
>                 LOG.info("Finished election: " + i + ", " + v.getId());
>                 Assert.assertTrue("State is not leading.", peer.getPeerState() == ServerState.LEADING);
>              } 
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (ZOOKEEPER-1328) Misplaced assertion for the test case 'FLELostMessageTest' and not identifying misfunctions

Posted by "Mahadev konar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-1328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13445060#comment-13445060 ] 

Mahadev konar commented on ZOOKEEPER-1328:
------------------------------------------

Thanks for the patience and quick response Rakesh. Really appreciate that. The patch looks good to me. Ill let hudson run through it and will go ahead and commit once it +1's.
                
> Misplaced assertion for the test case 'FLELostMessageTest' and not identifying misfunctions
> -------------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1328
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1328
>             Project: ZooKeeper
>          Issue Type: Test
>          Components: leaderElection
>    Affects Versions: 3.4.0
>            Reporter: Rakesh R
>            Assignee: Rakesh R
>             Fix For: 3.5.0
>
>         Attachments: ZOOKEEPER-1328.1.patch, ZOOKEEPER-1328.patch
>
>
> Assertion for testLostMessage is kept inside the thread.run() method. Due to this the assertion failure will not be reflected in the main testcase. 
> I have observed the test case is still passing in case of the assert failure or misfunction. Instead, the assertion can be moved to the test case - testLostMessage.
> {noformat}
> class LEThread extends Thread {
>           public void run(){
>                 peer.setCurrentVote(v);
>                 LOG.info("Finished election: " + i + ", " + v.getId());
>                 Assert.assertTrue("State is not leading.", peer.getPeerState() == ServerState.LEADING);
>              } 
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (ZOOKEEPER-1328) Misplaced assertion for the test case 'FLELostMessageTest' and not identifying misfunctions

Posted by "Mahadev konar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-1328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13446038#comment-13446038 ] 

Mahadev konar commented on ZOOKEEPER-1328:
------------------------------------------

Thanks for fixing that Rakesh. Ill run it through hudson again and will commit as soon as it +1's.
                
> Misplaced assertion for the test case 'FLELostMessageTest' and not identifying misfunctions
> -------------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1328
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1328
>             Project: ZooKeeper
>          Issue Type: Test
>          Components: leaderElection
>    Affects Versions: 3.4.0
>            Reporter: Rakesh R
>            Assignee: Rakesh R
>             Fix For: 3.5.0
>
>         Attachments: ZOOKEEPER-1328.1.patch, ZOOKEEPER-1328.2.patch, ZOOKEEPER-1328.patch
>
>
> Assertion for testLostMessage is kept inside the thread.run() method. Due to this the assertion failure will not be reflected in the main testcase. 
> I have observed the test case is still passing in case of the assert failure or misfunction. Instead, the assertion can be moved to the test case - testLostMessage.
> {noformat}
> class LEThread extends Thread {
>           public void run(){
>                 peer.setCurrentVote(v);
>                 LOG.info("Finished election: " + i + ", " + v.getId());
>                 Assert.assertTrue("State is not leading.", peer.getPeerState() == ServerState.LEADING);
>              } 
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (ZOOKEEPER-1328) Misplaced assertion for the test case 'FLELostMessageTest' and not identifying misfunctions

Posted by "Hadoop QA (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-1328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13168332#comment-13168332 ] 

Hadoop QA commented on ZOOKEEPER-1328:
--------------------------------------

+1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12507172/ZOOKEEPER-1328.patch
  against trunk revision 1212663.

    +1 @author.  The patch does not contain any @author tags.

    +1 tests included.  The patch appears to include 3 new or modified tests.

    +1 javadoc.  The javadoc tool did not generate any warning messages.

    +1 javac.  The applied patch does not increase the total number of javac compiler warnings.

    +1 findbugs.  The patch does not introduce any new Findbugs (version 1.3.9) warnings.

    +1 release audit.  The applied patch does not increase the total number of release audit warnings.

    +1 core tests.  The patch passed core unit tests.

    +1 contrib tests.  The patch passed contrib unit tests.

Test results: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/827//testReport/
Findbugs warnings: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/827//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/827//console

This message is automatically generated.
                
> Misplaced assertion for the test case 'FLELostMessageTest' and not identifying misfunctions
> -------------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1328
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1328
>             Project: ZooKeeper
>          Issue Type: Test
>          Components: leaderElection
>    Affects Versions: 3.4.0
>            Reporter: Rakesh R
>            Assignee: Rakesh R
>             Fix For: 3.5.0
>
>         Attachments: ZOOKEEPER-1328.patch
>
>
> Assertion for testLostMessage is kept inside the thread.run() method. Due to this the assertion failure will not be reflected in the main testcase. 
> I have observed the test case is still passing in case of the assert failure or misfunction. Instead, the assertion can be moved to the test case - testLostMessage.
> {noformat}
> class LEThread extends Thread {
>           public void run(){
>                 peer.setCurrentVote(v);
>                 LOG.info("Finished election: " + i + ", " + v.getId());
>                 Assert.assertTrue("State is not leading.", peer.getPeerState() == ServerState.LEADING);
>              } 
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (ZOOKEEPER-1328) Misplaced assertion for the test case 'FLELostMessageTest' and not identifying misfunctions

Posted by "Rakesh R (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-1328?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rakesh R updated ZOOKEEPER-1328:
--------------------------------

    Attachment: ZOOKEEPER-1328.patch
    
> Misplaced assertion for the test case 'FLELostMessageTest' and not identifying misfunctions
> -------------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1328
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1328
>             Project: ZooKeeper
>          Issue Type: Test
>          Components: leaderElection
>    Affects Versions: 3.4.0
>            Reporter: Rakesh R
>            Assignee: Rakesh R
>             Fix For: 3.5.0
>
>         Attachments: ZOOKEEPER-1328.patch
>
>
> Assertion for testLostMessage is kept inside the thread.run() method. Due to this the assertion failure will not be reflected in the main testcase. 
> I have observed the test case is still passing in case of the assert failure or misfunction. Instead, the assertion can be moved to the test case - testLostMessage.
> {noformat}
> class LEThread extends Thread {
>           public void run(){
>                 peer.setCurrentVote(v);
>                 LOG.info("Finished election: " + i + ", " + v.getId());
>                 Assert.assertTrue("State is not leading.", peer.getPeerState() == ServerState.LEADING);
>              } 
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (ZOOKEEPER-1328) Misplaced assertion for the test case 'FLELostMessageTest' and not identifying misfunctions

Posted by "Rakesh R (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-1328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13445684#comment-13445684 ] 

Rakesh R commented on ZOOKEEPER-1328:
-------------------------------------

Hi Mahadev, findbug is not from my code changes. It has come from Environment.java. 
{code}
org.apache.zookeeper.Environment.JAAS_CONF_KEY isn't final but should be
{code}

My latest patch, fixing the findbug also: made Environment.JAAS_CONF_KEY as "final"
                
> Misplaced assertion for the test case 'FLELostMessageTest' and not identifying misfunctions
> -------------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1328
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1328
>             Project: ZooKeeper
>          Issue Type: Test
>          Components: leaderElection
>    Affects Versions: 3.4.0
>            Reporter: Rakesh R
>            Assignee: Rakesh R
>             Fix For: 3.5.0
>
>         Attachments: ZOOKEEPER-1328.1.patch, ZOOKEEPER-1328.2.patch, ZOOKEEPER-1328.patch
>
>
> Assertion for testLostMessage is kept inside the thread.run() method. Due to this the assertion failure will not be reflected in the main testcase. 
> I have observed the test case is still passing in case of the assert failure or misfunction. Instead, the assertion can be moved to the test case - testLostMessage.
> {noformat}
> class LEThread extends Thread {
>           public void run(){
>                 peer.setCurrentVote(v);
>                 LOG.info("Finished election: " + i + ", " + v.getId());
>                 Assert.assertTrue("State is not leading.", peer.getPeerState() == ServerState.LEADING);
>              } 
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (ZOOKEEPER-1328) Misplaced assertion for the test case 'FLELostMessageTest' and not identifying misfunctions

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-1328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13447213#comment-13447213 ] 

Hudson commented on ZOOKEEPER-1328:
-----------------------------------

Integrated in ZooKeeper-trunk #1668 (See [https://builds.apache.org/job/ZooKeeper-trunk/1668/])
    ZOOKEEPER-1328. Misplaced assertion for the test case 'FLELostMessageTest' and not identifying misfunctions. (Rakesh R via mahadev) (Revision 1380130)

     Result = SUCCESS
mahadev : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1380130
Files : 
* /zookeeper/trunk/CHANGES.txt
* /zookeeper/trunk/src/java/main/org/apache/zookeeper/Environment.java
* /zookeeper/trunk/src/java/test/org/apache/zookeeper/test/FLEBackwardElectionRoundTest.java
* /zookeeper/trunk/src/java/test/org/apache/zookeeper/test/FLELostMessageTest.java
* /zookeeper/trunk/src/java/test/org/apache/zookeeper/test/FLETestUtils.java

                
> Misplaced assertion for the test case 'FLELostMessageTest' and not identifying misfunctions
> -------------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1328
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1328
>             Project: ZooKeeper
>          Issue Type: Test
>          Components: leaderElection
>    Affects Versions: 3.4.0
>            Reporter: Rakesh R
>            Assignee: Rakesh R
>             Fix For: 3.5.0
>
>         Attachments: ZOOKEEPER-1328.1.patch, ZOOKEEPER-1328.2.patch, ZOOKEEPER-1328.patch
>
>
> Assertion for testLostMessage is kept inside the thread.run() method. Due to this the assertion failure will not be reflected in the main testcase. 
> I have observed the test case is still passing in case of the assert failure or misfunction. Instead, the assertion can be moved to the test case - testLostMessage.
> {noformat}
> class LEThread extends Thread {
>           public void run(){
>                 peer.setCurrentVote(v);
>                 LOG.info("Finished election: " + i + ", " + v.getId());
>                 Assert.assertTrue("State is not leading.", peer.getPeerState() == ServerState.LEADING);
>              } 
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (ZOOKEEPER-1328) Misplaced assertion for the test case 'FLELostMessageTest' and not identifying misfunctions

Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-1328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13445081#comment-13445081 ] 

Hadoop QA commented on ZOOKEEPER-1328:
--------------------------------------

-1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12543066/ZOOKEEPER-1328.1.patch
  against trunk revision 1378285.

    +1 @author.  The patch does not contain any @author tags.

    +1 tests included.  The patch appears to include 9 new or modified tests.

    +1 javadoc.  The javadoc tool did not generate any warning messages.

    +1 javac.  The applied patch does not increase the total number of javac compiler warnings.

    -1 findbugs.  The patch appears to introduce 1 new Findbugs (version 1.3.9) warnings.

    +1 release audit.  The applied patch does not increase the total number of release audit warnings.

    +1 core tests.  The patch passed core unit tests.

    +1 contrib tests.  The patch passed contrib unit tests.

Test results: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/1173//testReport/
Findbugs warnings: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/1173//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/1173//console

This message is automatically generated.
                
> Misplaced assertion for the test case 'FLELostMessageTest' and not identifying misfunctions
> -------------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1328
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1328
>             Project: ZooKeeper
>          Issue Type: Test
>          Components: leaderElection
>    Affects Versions: 3.4.0
>            Reporter: Rakesh R
>            Assignee: Rakesh R
>             Fix For: 3.5.0
>
>         Attachments: ZOOKEEPER-1328.1.patch, ZOOKEEPER-1328.patch
>
>
> Assertion for testLostMessage is kept inside the thread.run() method. Due to this the assertion failure will not be reflected in the main testcase. 
> I have observed the test case is still passing in case of the assert failure or misfunction. Instead, the assertion can be moved to the test case - testLostMessage.
> {noformat}
> class LEThread extends Thread {
>           public void run(){
>                 peer.setCurrentVote(v);
>                 LOG.info("Finished election: " + i + ", " + v.getId());
>                 Assert.assertTrue("State is not leading.", peer.getPeerState() == ServerState.LEADING);
>              } 
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (ZOOKEEPER-1328) Misplaced assertion for the test case 'FLELostMessageTest' and not identifying misfunctions

Posted by "Rakesh R (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-1328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13446604#comment-13446604 ] 

Rakesh R commented on ZOOKEEPER-1328:
-------------------------------------

Thanks a lot Mahadev. QA Report has been generated, could you please have a look at the report.
                
> Misplaced assertion for the test case 'FLELostMessageTest' and not identifying misfunctions
> -------------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1328
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1328
>             Project: ZooKeeper
>          Issue Type: Test
>          Components: leaderElection
>    Affects Versions: 3.4.0
>            Reporter: Rakesh R
>            Assignee: Rakesh R
>             Fix For: 3.5.0
>
>         Attachments: ZOOKEEPER-1328.1.patch, ZOOKEEPER-1328.2.patch, ZOOKEEPER-1328.patch
>
>
> Assertion for testLostMessage is kept inside the thread.run() method. Due to this the assertion failure will not be reflected in the main testcase. 
> I have observed the test case is still passing in case of the assert failure or misfunction. Instead, the assertion can be moved to the test case - testLostMessage.
> {noformat}
> class LEThread extends Thread {
>           public void run(){
>                 peer.setCurrentVote(v);
>                 LOG.info("Finished election: " + i + ", " + v.getId());
>                 Assert.assertTrue("State is not leading.", peer.getPeerState() == ServerState.LEADING);
>              } 
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (ZOOKEEPER-1328) Misplaced assertion for the test case 'FLELostMessageTest' and not identifying misfunctions

Posted by "Rakesh R (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-1328?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rakesh R updated ZOOKEEPER-1328:
--------------------------------

    Attachment: ZOOKEEPER-1328.2.patch
    
> Misplaced assertion for the test case 'FLELostMessageTest' and not identifying misfunctions
> -------------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1328
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1328
>             Project: ZooKeeper
>          Issue Type: Test
>          Components: leaderElection
>    Affects Versions: 3.4.0
>            Reporter: Rakesh R
>            Assignee: Rakesh R
>             Fix For: 3.5.0
>
>         Attachments: ZOOKEEPER-1328.1.patch, ZOOKEEPER-1328.2.patch, ZOOKEEPER-1328.patch
>
>
> Assertion for testLostMessage is kept inside the thread.run() method. Due to this the assertion failure will not be reflected in the main testcase. 
> I have observed the test case is still passing in case of the assert failure or misfunction. Instead, the assertion can be moved to the test case - testLostMessage.
> {noformat}
> class LEThread extends Thread {
>           public void run(){
>                 peer.setCurrentVote(v);
>                 LOG.info("Finished election: " + i + ", " + v.getId());
>                 Assert.assertTrue("State is not leading.", peer.getPeerState() == ServerState.LEADING);
>              } 
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (ZOOKEEPER-1328) Misplaced assertion for the test case 'FLELostMessageTest' and not identifying misfunctions

Posted by "Rakesh R (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-1328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13444860#comment-13444860 ] 

Rakesh R commented on ZOOKEEPER-1328:
-------------------------------------

@Mahadev
I've rebased the patch and could you please have a look on the latest patch.

                
> Misplaced assertion for the test case 'FLELostMessageTest' and not identifying misfunctions
> -------------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1328
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1328
>             Project: ZooKeeper
>          Issue Type: Test
>          Components: leaderElection
>    Affects Versions: 3.4.0
>            Reporter: Rakesh R
>            Assignee: Rakesh R
>             Fix For: 3.5.0
>
>         Attachments: ZOOKEEPER-1328.1.patch, ZOOKEEPER-1328.patch
>
>
> Assertion for testLostMessage is kept inside the thread.run() method. Due to this the assertion failure will not be reflected in the main testcase. 
> I have observed the test case is still passing in case of the assert failure or misfunction. Instead, the assertion can be moved to the test case - testLostMessage.
> {noformat}
> class LEThread extends Thread {
>           public void run(){
>                 peer.setCurrentVote(v);
>                 LOG.info("Finished election: " + i + ", " + v.getId());
>                 Assert.assertTrue("State is not leading.", peer.getPeerState() == ServerState.LEADING);
>              } 
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (ZOOKEEPER-1328) Misplaced assertion for the test case 'FLELostMessageTest' and not identifying misfunctions

Posted by "Hadoop QA (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-1328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13181043#comment-13181043 ] 

Hadoop QA commented on ZOOKEEPER-1328:
--------------------------------------

+1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12507172/ZOOKEEPER-1328.patch
  against trunk revision 1227927.

    +1 @author.  The patch does not contain any @author tags.

    +1 tests included.  The patch appears to include 3 new or modified tests.

    +1 javadoc.  The javadoc tool did not generate any warning messages.

    +1 javac.  The applied patch does not increase the total number of javac compiler warnings.

    +1 findbugs.  The patch does not introduce any new Findbugs (version 1.3.9) warnings.

    +1 release audit.  The applied patch does not increase the total number of release audit warnings.

    +1 core tests.  The patch passed core unit tests.

    +1 contrib tests.  The patch passed contrib unit tests.

Test results: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/881//testReport/
Findbugs warnings: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/881//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/881//console

This message is automatically generated.
                
> Misplaced assertion for the test case 'FLELostMessageTest' and not identifying misfunctions
> -------------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1328
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1328
>             Project: ZooKeeper
>          Issue Type: Test
>          Components: leaderElection
>    Affects Versions: 3.4.0
>            Reporter: Rakesh R
>            Assignee: Rakesh R
>             Fix For: 3.5.0
>
>         Attachments: ZOOKEEPER-1328.patch
>
>
> Assertion for testLostMessage is kept inside the thread.run() method. Due to this the assertion failure will not be reflected in the main testcase. 
> I have observed the test case is still passing in case of the assert failure or misfunction. Instead, the assertion can be moved to the test case - testLostMessage.
> {noformat}
> class LEThread extends Thread {
>           public void run(){
>                 peer.setCurrentVote(v);
>                 LOG.info("Finished election: " + i + ", " + v.getId());
>                 Assert.assertTrue("State is not leading.", peer.getPeerState() == ServerState.LEADING);
>              } 
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (ZOOKEEPER-1328) Misplaced assertion for the test case 'FLELostMessageTest' and not identifying misfunctions

Posted by "Rakesh R (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-1328?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rakesh R updated ZOOKEEPER-1328:
--------------------------------

    Attachment: ZOOKEEPER-1328.1.patch
    
> Misplaced assertion for the test case 'FLELostMessageTest' and not identifying misfunctions
> -------------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1328
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1328
>             Project: ZooKeeper
>          Issue Type: Test
>          Components: leaderElection
>    Affects Versions: 3.4.0
>            Reporter: Rakesh R
>            Assignee: Rakesh R
>             Fix For: 3.5.0
>
>         Attachments: ZOOKEEPER-1328.1.patch, ZOOKEEPER-1328.patch
>
>
> Assertion for testLostMessage is kept inside the thread.run() method. Due to this the assertion failure will not be reflected in the main testcase. 
> I have observed the test case is still passing in case of the assert failure or misfunction. Instead, the assertion can be moved to the test case - testLostMessage.
> {noformat}
> class LEThread extends Thread {
>           public void run(){
>                 peer.setCurrentVote(v);
>                 LOG.info("Finished election: " + i + ", " + v.getId());
>                 Assert.assertTrue("State is not leading.", peer.getPeerState() == ServerState.LEADING);
>              } 
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira