Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-5103

ProcedureInTriggerTest depends on implicit ordering of test cases

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 10.8.1.2
    • 10.8.1.2
    • Test
    • None
    • Regression Test Failure

    Description

      If for example the test case testTriggerContainsSql is executed as the first test case, it will fail with the following error:

      1) testTriggerContainsSql(org.apache.derbyTesting.functionTests.tests.lang.ProcedureInTriggerTest)junit.framework.AssertionFailedError: expected:<2> but was:<0>
      at org.apache.derbyTesting.functionTests.tests.lang.ProcedureInTriggerTest.checkAndResetGetConnectionProcCount(ProcedureInTriggerTest.java:514)
      at org.apache.derbyTesting.functionTests.tests.lang.ProcedureInTriggerTest.testTriggerContainsSql(ProcedureInTriggerTest.java:120)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:112)
      at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
      at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
      at junit.extensions.TestSetup.run(TestSetup.java:25)
      at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)

      The test should either make the order of the test cases explicit or make the test cases independent of the order in which they run.

      Seen in the nightly tests, for example here: http://dbtg.foundry.sun.com/derby/test/Daily/jvm1.7/testing/testlog/lin/1076682-suitesAll_diff.txt

      Attachments

        1. rjall.out
          696 kB
          Lily Wei
        2. derby-5103-2a.diff
          0.9 kB
          Knut Anders Hatlen
        3. derby-5103-1a.diff
          3 kB
          Knut Anders Hatlen

        Activity

          People

            knutanders Knut Anders Hatlen
            knutanders Knut Anders Hatlen
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: