Derby
  1. Derby
  2. DERBY-5256

Improve error reporting in common.sanity.AssertFailure

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 10.9.1.0
    • Fix Version/s: 10.9.1.0
    • Component/s: None
    • Labels:
      None

      Description

      The error reporting in AssertFailure is somewhat imprecise, and it may also fail with an NPE:
      testAssertFailureNoThreadDump(org.apache.derbyTesting.unitTests.junit.AssertFailureTest) ERROR:
      java.lang.NullPointerException
      at org.apache.derby.shared.common.sanity.AssertFailure.dumpThreads(AssertFailure.java:190)
      at org.apache.derby.shared.common.sanity.AssertFailure.<init>(AssertFailure.java:82)
      at org.apache.derbyTesting.unitTests.junit.AssertFailureTest.testAssertFailureNoThreadDump(AssertFailureTest.java:114)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:616)
      at junit.framework.TestCase.runTest(TestCase.java:164)
      at junit.framework.TestCase.runBare(TestCase.java:130)
      at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:112)
      at junit.framework.TestResult$1.protect(TestResult.java:106)
      at junit.framework.TestResult.runProtected(TestResult.java:124)
      at junit.framework.TestResult.run(TestResult.java:109)
      at junit.framework.TestCase.run(TestCase.java:120)
      at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
      at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
      at junit.framework.TestResult.runProtected(TestResult.java:124)
      at junit.extensions.TestSetup.run(TestSetup.java:25)
      at junit.framework.TestSuite.runTest(TestSuite.java:230)
      at junit.framework.TestSuite.run(TestSuite.java:225)
      at junit.framework.TestSuite.runTest(TestSuite.java:230)
      at junit.framework.TestSuite.run(TestSuite.java:225)
      at kah.TestRunner.main(TestRunner.java:77)

        Activity

        Kristian Waagan created issue -
        Kristian Waagan made changes -
        Field Original Value New Value
        Attachment derby-5256-1a-error_reporting.diff [ 12481041 ]
        Kristian Waagan made changes -
        Issue & fix info [Patch Available]
        Kristian Waagan made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Issue & fix info [Patch Available]
        Fix Version/s 10.9.0.0 [ 12316344 ]
        Resolution Fixed [ 1 ]
        Gavin made changes -
        Workflow jira [ 12615221 ] Default workflow, editable Closed status [ 12801063 ]

          People

          • Assignee:
            Kristian Waagan
            Reporter:
            Kristian Waagan
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development