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

        Patrick Hunt created issue -
        Patrick Hunt made changes -
        Field Original Value New Value
        Assignee Patrick Hunt [ phunt ]
        Mahadev konar made changes -
        Fix Version/s 3.4.4 [ 12319841 ]
        Fix Version/s 3.5.0 [ 12316644 ]
        Fix Version/s 3.4.3 [ 12319288 ]
        Patrick Hunt made changes -
        Attachment ZOOKEEPER-1354.patch [ 12516254 ]
        Patrick Hunt made changes -
        Fix Version/s 3.5.0 [ 12316644 ]
        Patrick Hunt made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Camille Fournier made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development