Derby
  1. Derby
  2. DERBY-2505

Convert derbynet/testij.java to JUnit

    Details

    • Type: Improvement Improvement
    • 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

      In the process of converting this test, I realized we needed an way to run ij tests that would work with multiple connections. So, I made an IjTestCase that runs a script through ij's main method, redirects the output to a file, and then compares the file to a canon.

      Attaching a patch for this issue which does that. The test creates several databases during its run. Should the JUnit wrappers for ij tests be cleaning these up, or will these get cleaned up later automatically?

      1. derby-2505-jarfix.diff
        3 kB
        Andrew McIntyre
      2. derby-2505-v1.diff
        19 kB
        Andrew McIntyre

        Activity

        Hide
        Andrew McIntyre added a comment -

        Note that this also wraps a bunch of System property accesses in ij in privileged action blocks. I think the calls to System.getProperties() are not needed and should be replaced, these could be reduced to a set of calls to System.getProperty() for each ij property we are actually interested in, then pass those values out of the priv blocks in a new properties object. This should allow us to reduce the PropertyPermissions ij needs from "" read,write to "ij." read, write.

        Show
        Andrew McIntyre added a comment - Note that this also wraps a bunch of System property accesses in ij in privileged action blocks. I think the calls to System.getProperties() are not needed and should be replaced, these could be reduced to a set of calls to System.getProperty() for each ij property we are actually interested in, then pass those values out of the priv blocks in a new properties object. This should allow us to reduce the PropertyPermissions ij needs from " " read,write to "ij. " read, write.
        Hide
        Andrew McIntyre added a comment -

        Attaching a patch which fixes the problem running the test with jars. Moves writing ij's output into the extinout directory, and then grants permission to read/write/delete from $

        {user.dir}

        /extinout to derbytools.jar

        Show
        Andrew McIntyre added a comment - Attaching a patch which fixes the problem running the test with jars. Moves writing ij's output into the extinout directory, and then grants permission to read/write/delete from $ {user.dir} /extinout to derbytools.jar
        Hide
        Andrew McIntyre added a comment -

        Committed to trunk with revision 525649.

        Show
        Andrew McIntyre added a comment - Committed to trunk with revision 525649.
        Hide
        Kathey Marsden added a comment -

        reopen to change type from bug to test

        Show
        Kathey Marsden added a comment - reopen to change type from bug to test

          People

          • Assignee:
            Andrew McIntyre
            Reporter:
            Andrew McIntyre
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development