Derby
  1. Derby
  2. DERBY-2324

convert StmtCloseFunTest to JUnit

    Details

    • Type: Task Task
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 10.3.1.4
    • Fix Version/s: 10.3.1.4
    • Component/s: Test
    • Labels:
      None

      Description

      Convert StmtCloseFunTest to JUnit to eliminate multiple masters

      1. remove.stat
        0.5 kB
        Knut Anders Hatlen
      2. remove.diff
        23 kB
        Knut Anders Hatlen
      3. closedobjecttest.stat
        0.4 kB
        Knut Anders Hatlen
      4. closedobjecttest.diff
        10 kB
        Knut Anders Hatlen

        Activity

        Hide
        Knut Anders Hatlen added a comment -

        Just a FYI, I think most of what StmtCloseFunTest tests is covered by jdbc4.ClosedObjectTest.

        Show
        Knut Anders Hatlen added a comment - Just a FYI, I think most of what StmtCloseFunTest tests is covered by jdbc4.ClosedObjectTest.
        Hide
        Kathey Marsden added a comment -

        Since there is already Junit coverage for these cases, I won't convert this one.

        Show
        Kathey Marsden added a comment - Since there is already Junit coverage for these cases, I won't convert this one.
        Hide
        Myrna van Lunteren added a comment -

        I don't think it's appropriate to close this issue referring to the jdbc4 test.
        Looking at suites/AllPackages.java it appears this test currently only runs with jvms that support jdbc4 (i.e. jdk1.6 (and up, I assume)):
        // Suites that are compiled using Java SE 6 target need to
        // be added this way, otherwise creating the suite
        // will throw an invalid class version error
        if (JDBC.vmSupportsJDBC4())

        { suite.addTest( addSuiteByReflection( "org.apache.derbyTesting.functionTests.tests.jdbc4._Suite")); }

        Maybe ClosedObjectTest can be run with jdk14/jdk15...But just closing this is not ok, I think.
        However, for priority/urgency of this JIRA task: the StmtCloseFunTest now runs under the JDBCHarnessAdapter...

        Show
        Myrna van Lunteren added a comment - I don't think it's appropriate to close this issue referring to the jdbc4 test. Looking at suites/AllPackages.java it appears this test currently only runs with jvms that support jdbc4 (i.e. jdk1.6 (and up, I assume)): // Suites that are compiled using Java SE 6 target need to // be added this way, otherwise creating the suite // will throw an invalid class version error if (JDBC.vmSupportsJDBC4()) { suite.addTest( addSuiteByReflection( "org.apache.derbyTesting.functionTests.tests.jdbc4._Suite")); } Maybe ClosedObjectTest can be run with jdk14/jdk15...But just closing this is not ok, I think. However, for priority/urgency of this JIRA task: the StmtCloseFunTest now runs under the JDBCHarnessAdapter...
        Hide
        Kathey Marsden added a comment -

        Unassigning myself from this issue since the test is run under the adapter.

        Show
        Kathey Marsden added a comment - Unassigning myself from this issue since the test is run under the adapter.
        Hide
        Knut Anders Hatlen added a comment -

        The attached patch (closedobjecttest.diff) moves ClosedObjectTest from the jdbc4 suite to jdbcapi and makes the necessary changes so that it runs under jdk1.4/jdk1.5 (and possibly JSR169, but I haven't tested it). Before this patch can be applied, you must run "svn rename java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/ClosedObjectTest.java java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ClosedObjectTest.java".

        Show
        Knut Anders Hatlen added a comment - The attached patch (closedobjecttest.diff) moves ClosedObjectTest from the jdbc4 suite to jdbcapi and makes the necessary changes so that it runs under jdk1.4/jdk1.5 (and possibly JSR169, but I haven't tested it). Before this patch can be applied, you must run "svn rename java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/ClosedObjectTest.java java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ClosedObjectTest.java".
        Hide
        Knut Anders Hatlen added a comment -

        Committed closedobjecttest.diff to trunk with revision 510012.

        Show
        Knut Anders Hatlen added a comment - Committed closedobjecttest.diff to trunk with revision 510012.
        Hide
        Daniel John Debrunner added a comment -

        ClosedObjecttest fails on J2ME/CDC/Foundation since the incorrect suite is returned from the suite() method.
        Will commit a fix soon.

        Show
        Daniel John Debrunner added a comment - ClosedObjecttest fails on J2ME/CDC/Foundation since the incorrect suite is returned from the suite() method. Will commit a fix soon.
        Hide
        Daniel John Debrunner added a comment -

        Committed revision 510140 to get the test running on J2ME.

        Show
        Daniel John Debrunner added a comment - Committed revision 510140 to get the test running on J2ME.
        Hide
        Knut Anders Hatlen added a comment -

        Thanks Dan for making it run under J2ME! (I was hoping you would if I could find a way to break it...

        Now that ClosedObjectTest runs on all supported JVMs, would it be OK to remove StmtCloseFunTest?

        Show
        Knut Anders Hatlen added a comment - Thanks Dan for making it run under J2ME! (I was hoping you would if I could find a way to break it... Now that ClosedObjectTest runs on all supported JVMs, would it be OK to remove StmtCloseFunTest?
        Hide
        Myrna van Lunteren added a comment -

        I think this test can be removed, yes. StmtCloseFunTest is no longer in suites/derby* but it's running via jdbcapi/JDBCHarnessJavaTest.java...

        Show
        Myrna van Lunteren added a comment - I think this test can be removed, yes. StmtCloseFunTest is no longer in suites/derby* but it's running via jdbcapi/JDBCHarnessJavaTest.java...
        Hide
        Knut Anders Hatlen added a comment -

        remove.diff removes StmtCloseFunTest.

        Show
        Knut Anders Hatlen added a comment - remove.diff removes StmtCloseFunTest.
        Hide
        Knut Anders Hatlen added a comment -

        Committed revision 512172.

        Show
        Knut Anders Hatlen added a comment - Committed revision 512172.

          People

          • Assignee:
            Knut Anders Hatlen
            Reporter:
            Kathey Marsden
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development