Derby
  1. Derby
  2. DERBY-5609

Prepare old test harness for running tests on Java 8

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 10.9.1.0
    • Fix Version/s: 10.8.3.0, 10.9.1.0
    • Component/s: Test
    • Labels:
      None

      Description

      When running an old harness test with a Java 8 preview (available from http://jdk8.java.net/download.html), it'll fail like this:

      $ java org.apache.derbyTesting.functionTests.harness.RunTest lang/supersimple.sql
      – listing properties –
      derby.locks.deadlockTimeout=3
      derby.locks.waitTimeout=3
      WHOA, javavm is NULL
      Process exception: java.lang.ClassNotFoundException: org.apache.derbyTesting.functionTests.harness.jdk18

          • Start: supersimple jdk1.8.0-ea 2012-02-08 20:29:59 ***
            Exception in thread "main" java.lang.ClassNotFoundException: org.apache.derbyTesting.functionTests.harness.jdk18
            at java.net.URLClassLoader$1.run(URLClassLoader.java:359)
            at java.net.URLClassLoader$1.run(URLClassLoader.java:348)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(URLClassLoader.java:347)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
            at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
            at java.lang.Class.forName0(Native Method)
            at java.lang.Class.forName(Class.java:181)
            at org.apache.derbyTesting.functionTests.harness.jvm.getJvm(jvm.java:217)
            at org.apache.derbyTesting.functionTests.harness.RunTest.buildTestCommand(RunTest.java:2267)
            at org.apache.derbyTesting.functionTests.harness.RunTest.testRun(RunTest.java:490)
            at org.apache.derbyTesting.functionTests.harness.RunTest.main(RunTest.java:360)

      We need to add the org.apache.derbyTesting.functionTests.harness.jdk18 class to make the tests run on Java 8.

      1. jdk18.diff
        3 kB
        Knut Anders Hatlen

        Activity

        Hide
        Knut Anders Hatlen added a comment -

        To get the tests to run on Java 8, first run the following command:

        svn copy java/testing/org/apache/derbyTesting/functionTests/harness/jdk17.java java/testing/org/apache/derbyTesting/functionTests/harness/jdk18.java

        And then apply the attached jdk18.diff patch.

        I'm running the full derbyall suite on Java 8 now to see if there are more things missing.

        Show
        Knut Anders Hatlen added a comment - To get the tests to run on Java 8, first run the following command: svn copy java/testing/org/apache/derbyTesting/functionTests/harness/jdk17.java java/testing/org/apache/derbyTesting/functionTests/harness/jdk18.java And then apply the attached jdk18.diff patch. I'm running the full derbyall suite on Java 8 now to see if there are more things missing.
        Hide
        Knut Anders Hatlen added a comment -

        Derbyall passed. Committed revision 1242098.

        I also plan to backport the fix to 10.8.

        Show
        Knut Anders Hatlen added a comment - Derbyall passed. Committed revision 1242098. I also plan to backport the fix to 10.8.
        Hide
        Knut Anders Hatlen added a comment -

        Merged to 10.8 and committed revision 1242294.

        Show
        Knut Anders Hatlen added a comment - Merged to 10.8 and committed revision 1242294.

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development