Uploaded image for project: 'ZooKeeper'
  1. ZooKeeper
  2. ZOOKEEPER-2174

JUnit4ZKTestRunner logs test failure for all exceptions even if the test method is annotated with an expected exception.

Log workAgile BoardRank to TopRank to BottomAttach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 3.4.7, 3.5.2, 3.6.0
    • tests
    • None

    Description

      JUnit4ZKTestRunner wraps JUnit test method execution, and if any exception is thrown, it logs a message stating that the test failed. However, some ZooKeeper tests are annotated with @Test(expected=...) to indicate that an exception is the expected result, and thus the test passes. The runner should be aware of expected exceptions and only log if an unexpected exception occurs.

      Attachments

        1. ZOOKEEPER-2174.001.patch
          2 kB
          Chris Nauroth
        2. ZOOKEEPER-2174.002.patch
          2 kB
          Chris Nauroth
        3. ZOOKEEPER-2174.003.patch
          2 kB
          Chris Nauroth
        4. ZOOKEEPER-2174.004.patch
          2 kB
          Chris Nauroth
        5. ZOOKEEPER-2174-branch-3.4.004.patch
          2 kB
          Chris Nauroth

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            cnauroth Chris Nauroth Assign to me
            cnauroth Chris Nauroth
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment