[ 
https://issues.apache.org/jira/browse/DERBY-3445?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12575987#action_12575987
 ] 

Daniel John Debrunner commented on DERBY-3445:
----------------------------------------------

There's a minor issue in that if the network server is run as a separate 
process then I don't think it can write out the coverage information due to the 
default policy file.
I see these errors now that by default spawning a process network server prints 
out any stderr.

Not sure what a solution is, maybe the server should remove the security 
manager when it shuts down?

I'm seeing exceptions like this:
    [junit] java.security.AccessControlException: Access denied 
(java.io.FilePermission coverage.ec read)
    [junit]     at 
java.security.AccessController.checkPermission(AccessController.java:104)
    [junit]     at 
java.lang.SecurityManager.checkPermission(SecurityManager.java:547)
    [junit]     at java.lang.SecurityManager.checkRead(SecurityManager.java:886)
    [junit]     at java.io.File.exists(File.java:726)
    [junit]     at 
com.vladium.emma.data.DataFactory.persist(DataFactory.java:525)
    [junit]     at 
com.vladium.emma.data.DataFactory.persist(DataFactory.java:86)
    [junit]     at 
com.vladium.emma.rt.RTCoverageDataPersister.dumpCoverageData(RTCoverageDataPersister.java:54)
    [junit]     at com.vladium.emma.rt.RTExitHook.run(RTExitHook.java:32)
    [junit]     at java.lang.Thread.run(Thread.java:801)
    [junit] Exception in thread "EMMA shutdown handler thread" 
java.lang.RuntimeException: EMMA failed to dump coverage data: 
java.security.AccessControlException: Access denied (java.io.FilePermission 
coverage.ec read)
    [junit]     at 
com.vladium.emma.rt.RTCoverageDataPersister.dumpCoverageData(RTCoverageDataPersister.java:71)
    [junit]     at com.vladium.emma.rt.RTExitHook.run(RTExitHook.java:32)
    [junit]     at java.lang.Thread.run(Thread.java:801)

> Make it easier to use the EMMA tool to measure the code coverage of the Derby 
> testing
> -------------------------------------------------------------------------------------
>
>                 Key: DERBY-3445
>                 URL: https://issues.apache.org/jira/browse/DERBY-3445
>             Project: Derby
>          Issue Type: Improvement
>          Components: Build tools
>            Reporter: Vemund Østgaard
>            Assignee: Vemund Østgaard
>         Attachments: 3445-emma-clean-fix-diff, 3445-general-diff, 
> 3445-general-diffv2, 3445-singletest-codeline-jars-diff, 
> 3445-singletest-diff, 3445-SysinfoLocaleTest-diff, 3445-testspecific-diff, 
> 3445-testspecific-diffv2
>
>
> It is a bit tricky to use EMMA to measure code coverage for the derby testing.
> Modifications must be made to the source both to avoid problems with the 
> SecurityManager and individual tests. It would be good if these modifcations 
> could be done once and for all so that it was easier for anyone to run the 
> tests with EMMA.
> It would also be good to have ant tasks that would make it even easier to run 
> the tests with EMMA.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to