You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Knut Anders Hatlen (JIRA)" <ji...@apache.org> on 2012/06/15 13:12:42 UTC

[jira] [Created] (DERBY-5821) tools/derbyrunjartest.java doesn't use jvmflags

Knut Anders Hatlen created DERBY-5821:
-----------------------------------------

             Summary: tools/derbyrunjartest.java doesn't use jvmflags
                 Key: DERBY-5821
                 URL: https://issues.apache.org/jira/browse/DERBY-5821
             Project: Derby
          Issue Type: Improvement
          Components: Test
    Affects Versions: 10.10.0.0
            Reporter: Knut Anders Hatlen
            Priority: Minor


tools/derbyrunjartest.java doesn't use the jvmflags property when it starts a sub-process, so one cannot pass custom flags to the process. This makes it difficult to get the test to pass when running with code coverage tools.

For example, for EMMA, we need to manipulate the classpath and reduce the verbosity level. And we need to pass a -javaagent flag if we're running with JaCoCo. Using the jvmflags property works for those tests that don't spawn processes.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (DERBY-5821) tools/derbyrunjartest.java doesn't use jvmflags

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5821?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Knut Anders Hatlen resolved DERBY-5821.
---------------------------------------

       Resolution: Fixed
    Fix Version/s: 10.10.0.0

Committed revision 1353862.
                
> tools/derbyrunjartest.java doesn't use jvmflags
> -----------------------------------------------
>
>                 Key: DERBY-5821
>                 URL: https://issues.apache.org/jira/browse/DERBY-5821
>             Project: Derby
>          Issue Type: Improvement
>          Components: Test
>    Affects Versions: 10.10.0.0
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>            Priority: Minor
>             Fix For: 10.10.0.0
>
>         Attachments: d5821-1a.diff
>
>
> tools/derbyrunjartest.java doesn't use the jvmflags property when it starts a sub-process, so one cannot pass custom flags to the process. This makes it difficult to get the test to pass when running with code coverage tools.
> For example, for EMMA, we need to manipulate the classpath and reduce the verbosity level. And we need to pass a -javaagent flag if we're running with JaCoCo. Using the jvmflags property works for those tests that don't spawn processes.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Reopened] (DERBY-5821) tools/derbyrunjartest.java doesn't use jvmflags

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5821?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Knut Anders Hatlen reopened DERBY-5821:
---------------------------------------


Reopening the issue since I forgot to add the JUnit test to the tools._Suite. Also, the test case for the server command fails on J2ME platforms, because the server isn't supported on those platforms, and should be skipped.
                
> tools/derbyrunjartest.java doesn't use jvmflags
> -----------------------------------------------
>
>                 Key: DERBY-5821
>                 URL: https://issues.apache.org/jira/browse/DERBY-5821
>             Project: Derby
>          Issue Type: Improvement
>          Components: Test
>    Affects Versions: 10.10.0.0
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>            Priority: Minor
>             Fix For: 10.10.0.0
>
>         Attachments: d5821-1a.diff
>
>
> tools/derbyrunjartest.java doesn't use the jvmflags property when it starts a sub-process, so one cannot pass custom flags to the process. This makes it difficult to get the test to pass when running with code coverage tools.
> For example, for EMMA, we need to manipulate the classpath and reduce the verbosity level. And we need to pass a -javaagent flag if we're running with JaCoCo. Using the jvmflags property works for those tests that don't spawn processes.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Closed] (DERBY-5821) tools/derbyrunjartest.java doesn't use jvmflags

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5821?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Knut Anders Hatlen closed DERBY-5821.
-------------------------------------

    Resolution: Fixed

Committed revision 1359068.
                
> tools/derbyrunjartest.java doesn't use jvmflags
> -----------------------------------------------
>
>                 Key: DERBY-5821
>                 URL: https://issues.apache.org/jira/browse/DERBY-5821
>             Project: Derby
>          Issue Type: Improvement
>          Components: Test
>    Affects Versions: 10.10.0.0
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>            Priority: Minor
>             Fix For: 10.10.0.0
>
>         Attachments: d5821-1a.diff, d5821-2a.patch
>
>
> tools/derbyrunjartest.java doesn't use the jvmflags property when it starts a sub-process, so one cannot pass custom flags to the process. This makes it difficult to get the test to pass when running with code coverage tools.
> For example, for EMMA, we need to manipulate the classpath and reduce the verbosity level. And we need to pass a -javaagent flag if we're running with JaCoCo. Using the jvmflags property works for those tests that don't spawn processes.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Assigned] (DERBY-5821) tools/derbyrunjartest.java doesn't use jvmflags

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5821?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Knut Anders Hatlen reassigned DERBY-5821:
-----------------------------------------

    Assignee: Knut Anders Hatlen

It's probably better to convert the test to JUnit and leave the old harness as it is. I'll give it a try.
                
> tools/derbyrunjartest.java doesn't use jvmflags
> -----------------------------------------------
>
>                 Key: DERBY-5821
>                 URL: https://issues.apache.org/jira/browse/DERBY-5821
>             Project: Derby
>          Issue Type: Improvement
>          Components: Test
>    Affects Versions: 10.10.0.0
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>            Priority: Minor
>
> tools/derbyrunjartest.java doesn't use the jvmflags property when it starts a sub-process, so one cannot pass custom flags to the process. This makes it difficult to get the test to pass when running with code coverage tools.
> For example, for EMMA, we need to manipulate the classpath and reduce the verbosity level. And we need to pass a -javaagent flag if we're running with JaCoCo. Using the jvmflags property works for those tests that don't spawn processes.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (DERBY-5821) tools/derbyrunjartest.java doesn't use jvmflags

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5821?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Knut Anders Hatlen updated DERBY-5821:
--------------------------------------

    Attachment: d5821-1a.diff

Attached is a patch that rewrites derbyrunjartest as a JUnit 
test and removes it from the old harness.

Both suites.All and derbyall passed with the patch.

Details:

- build.xml

Add derbyrun.jar to the classpath when running JUnit tests under EMMA. It wasn't needed before, since none of the other JUnit tests used derbyrun.jar.

- functionTests/master/derbyrunjartest.out

Remove old canon.

- functionTests/suites/derbytools.runall

Remove from old harness suite.

- functionTests/tests/tools/build.xml

Make sure newly created policy file gets copied to classes directory.

- functionTests/tests/tools/derbyrunjartest.java

Execute the tools and compare actual output with the expected output using BaseTestCase.assertExecJavaCmdAsExpected().

- functionTests/tests/tools/derbyrunjartest.policy

Additional permissions needed for the test to run (test classes need permission to find the location of derbyrun.jar). The original version of the test ran without a security manager for this reason.

- functionTests/tests/tools/derbyrunjartest_app.properties
- functionTests/tests/tools/derbyrunjartest_sed.properties

Remove files used by the old harness.

- junit/BaseTestCase.java

Added logic to pass emma.jar to the classpath of the sub-process when running java -jar. Since you cannot add jar files directly to the classpath when running with -jar, emma.jar is added to the bootclasspath.
                
> tools/derbyrunjartest.java doesn't use jvmflags
> -----------------------------------------------
>
>                 Key: DERBY-5821
>                 URL: https://issues.apache.org/jira/browse/DERBY-5821
>             Project: Derby
>          Issue Type: Improvement
>          Components: Test
>    Affects Versions: 10.10.0.0
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>            Priority: Minor
>         Attachments: d5821-1a.diff
>
>
> tools/derbyrunjartest.java doesn't use the jvmflags property when it starts a sub-process, so one cannot pass custom flags to the process. This makes it difficult to get the test to pass when running with code coverage tools.
> For example, for EMMA, we need to manipulate the classpath and reduce the verbosity level. And we need to pass a -javaagent flag if we're running with JaCoCo. Using the jvmflags property works for those tests that don't spawn processes.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (DERBY-5821) tools/derbyrunjartest.java doesn't use jvmflags

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5821?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Knut Anders Hatlen updated DERBY-5821:
--------------------------------------

    Attachment: d5821-2a.patch

Attaching a patch that adds the test to tools._Suite and makes it skip testServer() on J2ME platforms.
                
> tools/derbyrunjartest.java doesn't use jvmflags
> -----------------------------------------------
>
>                 Key: DERBY-5821
>                 URL: https://issues.apache.org/jira/browse/DERBY-5821
>             Project: Derby
>          Issue Type: Improvement
>          Components: Test
>    Affects Versions: 10.10.0.0
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>            Priority: Minor
>             Fix For: 10.10.0.0
>
>         Attachments: d5821-1a.diff, d5821-2a.patch
>
>
> tools/derbyrunjartest.java doesn't use the jvmflags property when it starts a sub-process, so one cannot pass custom flags to the process. This makes it difficult to get the test to pass when running with code coverage tools.
> For example, for EMMA, we need to manipulate the classpath and reduce the verbosity level. And we need to pass a -javaagent flag if we're running with JaCoCo. Using the jvmflags property works for those tests that don't spawn processes.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira