• Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.3.0
    • Component/s: contrib-bookkeeper
    • Labels:


      The test case testAsyncCreateClose is badly broken. I was wondering why all the unit tests are passing inspite of having found so many different problems with LedgerManagementProcessor.

      There is a big try-catch block sitting in the test case that catches all exception, prints their stack trace, and exits, thereby allowing the test to pass. In general, unit tests shouldnt catch exceptions unless it is something you are expecting that will happen.

      Another problem is that the same ControlObject is used for synchronization throughout. Since we already have the problem of callbacks being called multiple times (ZOOKEEPER-502), notify() on the control object is called too many times, resulting in the unit test not waiting for certain callbacks.

      Thus the test never waits for the asyncOpenLedger() to finish, and hence still succeeds. I believe asyncOpenLedger() has never worked right.

      1. ZOOKEEPER-505.1.patch
        2 kB
        Utkarsh Srivastava

        Issue Links


          Utkarsh Srivastava created issue -
          Utkarsh Srivastava made changes -
          Field Original Value New Value
          Attachment ZOOKEEPER-505.1.patch [ 12415968 ]
          Utkarsh Srivastava made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          Flavio Junqueira made changes -
          Status Patch Available [ 10002 ] Open [ 1 ]
          Mahadev konar made changes -
          Fix Version/s 3.3.0 [ 12313976 ]
          Utkarsh Srivastava made changes -
          Link This issue is part of ZOOKEEPER-507 [ ZOOKEEPER-507 ]
          Mahadev konar made changes -
          Assignee Utkarsh Srivastava [ utkarsh ]
          Mahadev konar made changes -
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Resolved [ 5 ]
          Patrick Hunt made changes -
          Status Resolved [ 5 ] Closed [ 6 ]


            • Assignee:
              Utkarsh Srivastava
              Utkarsh Srivastava
            • Votes:
              0 Vote for this issue
              0 Start watching this issue


              • Created: