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

        Kathey Marsden created issue -
        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.
        Kathey Marsden made changes -
        Field Original Value New Value
        Status Open [ 1 ] Closed [ 6 ]
        Resolution Won't Fix [ 2 ]
        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...
        Myrna van Lunteren made changes -
        Resolution Won't Fix [ 2 ]
        Status Closed [ 6 ] Reopened [ 4 ]
        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.
        Kathey Marsden made changes -
        Assignee Kathey Marsden [ kmarsden ]
        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".
        Knut Anders Hatlen made changes -
        Attachment closedobjecttest.stat [ 12351510 ]
        Attachment closedobjecttest.diff [ 12351509 ]
        Knut Anders Hatlen made changes -
        Derby Info [Patch Available]
        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.
        Knut Anders Hatlen made changes -
        Derby Info [Patch Available]
        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.
        Knut Anders Hatlen made changes -
        Attachment remove.stat [ 12352095 ]
        Attachment remove.diff [ 12352094 ]
        Hide
        Knut Anders Hatlen added a comment -

        Committed revision 512172.

        Show
        Knut Anders Hatlen added a comment - Committed revision 512172.
        Knut Anders Hatlen made changes -
        Resolution Fixed [ 1 ]
        Assignee Knut Anders Hatlen [ knutanders ]
        Status Reopened [ 4 ] Resolved [ 5 ]
        Kathey Marsden made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Gavin made changes -
        Workflow jira [ 12397265 ] Default workflow, editable Closed status [ 12798419 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Closed Closed
        22h 7m 1 Kathey Marsden 13/Feb/07 20:56
        Closed Closed Reopened Reopened
        1h 14m 1 Myrna van Lunteren 13/Feb/07 22:10
        Reopened Reopened Resolved Resolved
        13d 10h 17m 1 Knut Anders Hatlen 27/Feb/07 08:27
        Resolved Resolved Closed Closed
        76d 8h 4m 1 Kathey Marsden 14/May/07 17:32

          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