Derby
  1. Derby
  2. DERBY-5808

Compatibility test should use BaseTestCase.execJavaCmd()

    Details

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

      Description

      The compatibility test should use BaseTestCase.execJavaCmd() instead of calling Runtime.exec() directly. This would make it easier to pass flags (like EMMA code coverage properties) to the processes spawned by the compatibility test.

      1. d5808-1a.diff
        19 kB
        Knut Anders Hatlen

        Issue Links

          Activity

          Hide
          Knut Anders Hatlen added a comment -

          The attached patch (d5808-1a.diff) makes the following changes:

          • junit/BaseTestCase.java:

          Make it possible to specify which Java executable to use when invoking execJavaCmd() (since the compatibility test mixes multiple Java versions).

          • functionTests/tests/replicationTests/ReplicationRun.java:

          Update call to execJavaCmd() to match the new signature.

          • functionTests/tests/junitTests/compatibility/CompatibilityCombinations.java:

          Replace all calls to Runtime.exec() with calls to BaseTestCase.execJavaCmd().

          I ran derbyall + suites.All + compatibility test successfully with the patch.

          Show
          Knut Anders Hatlen added a comment - The attached patch (d5808-1a.diff) makes the following changes: junit/BaseTestCase.java: Make it possible to specify which Java executable to use when invoking execJavaCmd() (since the compatibility test mixes multiple Java versions). functionTests/tests/replicationTests/ReplicationRun.java: Update call to execJavaCmd() to match the new signature. functionTests/tests/junitTests/compatibility/CompatibilityCombinations.java: Replace all calls to Runtime.exec() with calls to BaseTestCase.execJavaCmd(). I ran derbyall + suites.All + compatibility test successfully with the patch.
          Hide
          Kristian Waagan added a comment -

          The patch looks good to me, Knut Anders.
          +1

          Show
          Kristian Waagan added a comment - The patch looks good to me, Knut Anders. +1
          Hide
          Knut Anders Hatlen added a comment -

          Thanks, Kristian. Committed r1350133.

          Show
          Knut Anders Hatlen added a comment - Thanks, Kristian. Committed r1350133.

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Development