Uploaded image for project: 'IronJacamar'
  1. IronJacamar
  2. JBJCA-1008

Assert.fail() cannot be surrounded with a try-catch block which catches a general Throwable

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 1.0.16.Final, 1.1.0.Beta5
    • 1.0.15.Final, 1.1.0.Beta4
    • Test suite
    • None

    Description

      In IJ test suite there are occurrences of Assert.fail(String) surrounding with a try-catch block that catches a general Throwable. This effectively means that AssertionError produced by Assert.fail() is eaten by the following catch clause, usually quietly. And then such a test passes instead of it fails.

      Affected tests:

      adapters/src/test/java/org/jboss/jca/adapters/jdbc/unit/H2SecurityDomainMultipleUsersTestCase.java
      core/src/test/java/org/jboss/jca/core/connectionmanager/connections/InterleavingTestCase.java
      deployers/src/test/java/org/jboss/jca/deployers/annotations/AnnotationsTestCase.java
      embedded/src/test/java/org/jboss/jca/embedded/unit/ShrinkWrapTestCase.java
      

      Attachments

        Activity

          People

            istudens@redhat.com Ivo Studensky
            istudens@redhat.com Ivo Studensky
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: