ZooKeeper
  1. ZooKeeper
  2. ZOOKEEPER-1354

AuthTest.testBadAuthThenSendOtherCommands fails intermittently

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.4.0
    • Fix Version/s: 3.4.4, 3.5.0
    • Component/s: tests
    • Labels:
      None

      Description

      I'm seeing the following intermittent failure:

      junit.framework.AssertionFailedError: Should have called my watcher expected:<1> but was:<0>
      	at org.apache.zookeeper.test.AuthTest.testBadAuthThenSendOtherCommands(AuthTest.java:89)
      	at org.apache.zookeeper.JUnit4ZKTestRunner$LoggedInvokeMethod.evaluate(JUnit4ZKTestRunner.java:52)
      

      The following commit introduced this test:

      ZOOKEEPER-1152. Exceptions thrown from handleAuthentication can cause buffer corruption issues in NIOServer. (camille via breed)

      + Assert.assertEquals("Should have called my watcher",
      + 1, authFailed.get());

      I think it's due to either a) the code is not waiting for the
      notification to be propagated, or 2) the message doesn't make it back
      from the server to the client prior to the socket or the clientcnxn
      being closed.

      What do you think, should I just wait for the notification to arrive? or do you think it's 2). ?

        Activity

        Hide
        Hudson added a comment -

        Integrated in ZooKeeper-trunk #1478 (See https://builds.apache.org/job/ZooKeeper-trunk/1478/)
        ZOOKEEPER-1354: AuthTest.testBadAuthThenSendOtherCommands fails intermittently (phunt via camille) (Revision 1296035)

        Result = SUCCESS
        camille : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1296035
        Files :

        • /zookeeper/trunk/CHANGES.txt
        • /zookeeper/trunk/src/java/test/org/apache/zookeeper/test/AuthTest.java
        Show
        Hudson added a comment - Integrated in ZooKeeper-trunk #1478 (See https://builds.apache.org/job/ZooKeeper-trunk/1478/ ) ZOOKEEPER-1354 : AuthTest.testBadAuthThenSendOtherCommands fails intermittently (phunt via camille) (Revision 1296035) Result = SUCCESS camille : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1296035 Files : /zookeeper/trunk/CHANGES.txt /zookeeper/trunk/src/java/test/org/apache/zookeeper/test/AuthTest.java
        Hide
        Camille Fournier added a comment -

        Checked in to 3.4.4 and trunk

        Show
        Camille Fournier added a comment - Checked in to 3.4.4 and trunk
        Hide
        Camille Fournier added a comment -

        This looks good, I'll check it in to trunk.

        Show
        Camille Fournier added a comment - This looks good, I'll check it in to trunk.
        Hide
        Hadoop QA added a comment -

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

        +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/965//testReport/
        Findbugs warnings: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/965//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
        Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/965//console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - +1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12516254/ZOOKEEPER-1354.patch against trunk revision 1294000. +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/965//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/965//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/965//console This message is automatically generated.
        Hide
        Patrick Hunt added a comment -

        This patch allows for the notification to be a bit delayed (which is possible and still correct).

        Show
        Patrick Hunt added a comment - This patch allows for the notification to be a bit delayed (which is possible and still correct).
        Hide
        Patrick Hunt added a comment -

        Thanks Camille, I'll work on fixing this.

        Show
        Patrick Hunt added a comment - Thanks Camille, I'll work on fixing this.
        Hide
        Camille Fournier added a comment -

        You're getting the AuthFailed exception, the watcher code just didn't execute fast enough, so I think it's 1.

        Show
        Camille Fournier added a comment - You're getting the AuthFailed exception, the watcher code just didn't execute fast enough, so I think it's 1.
        Hide
        Camille Fournier added a comment -

        Hmmm. Let me take a look.

        Show
        Camille Fournier added a comment - Hmmm. Let me take a look.

          People

          • Assignee:
            Patrick Hunt
            Reporter:
            Patrick Hunt
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development