db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DERBY-6685) Permission problems when running JUnit tests with Ant 1.9.4
Date Wed, 06 Aug 2014 09:07:14 GMT

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

Knut Anders Hatlen commented on DERBY-6685:
-------------------------------------------

I'll see if the fix can be backported. The suites.All jobs on builds.apache.org are currently
configured to use the latest version of Ant, so they will run into this problem (they apparently
haven't run after Ant was upgraded on the Jenkins server). We have build jobs for branches
back to 10.9.

> Permission problems when running JUnit tests with Ant 1.9.4
> -----------------------------------------------------------
>
>                 Key: DERBY-6685
>                 URL: https://issues.apache.org/jira/browse/DERBY-6685
>             Project: Derby
>          Issue Type: Bug
>          Components: Test
>    Affects Versions: 10.11.1.1
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>         Attachments: d6685-1a.diff
>
>
> I saw many permission problems when I set up a build job for the 10.11 branch. See for
example this log: https://builds.apache.org/job/Derby-10.11-suites.All/1/console
> First stack trace:
> {noformat}
>     [junit] Running org.apache.derby.PackagePrivateTestSuite
>     [junit] Tests run: 67, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 5.662 sec
>     [junit] Exception in thread "main" java.security.AccessControlException: access denied
("java.io.FilePermission" "/home/jenkins/jenkins-slave/workspace/Derby-10.11-suites.All/10.11-head/junit_20140804_1122/TEST-org.apache.derby.PackagePrivateTestSuite.xml"
"write")
>     [junit] 	at java.security.AccessControlContext.checkPermission(AccessControlContext.java:457)
>     [junit] 	at java.security.AccessController.checkPermission(AccessController.java:884)
>     [junit] 	at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
>     [junit] 	at java.lang.SecurityManager.checkWrite(SecurityManager.java:979)
>     [junit] 	at java.io.FileOutputStream.<init>(FileOutputStream.java:194)
>     [junit] 	at java.io.FileOutputStream.<init>(FileOutputStream.java:156)
>     [junit] 	at org.apache.tools.ant.taskdefs.optional.junit.FormatterElement$DelayedFileOutputStream.write(FormatterElement.java:381)
>     [junit] 	at java.io.OutputStream.write(OutputStream.java:116)
>     [junit] 	at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:221)
>     [junit] 	at sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:291)
>     [junit] 	at sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:295)
>     [junit] 	at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:141)
>     [junit] 	at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:229)
>     [junit] 	at java.io.BufferedWriter.flush(BufferedWriter.java:254)
>     [junit] 	at org.apache.tools.ant.util.DOMElementWriter.openElement(DOMElementWriter.java:371)
>     [junit] 	at org.apache.tools.ant.util.DOMElementWriter.write(DOMElementWriter.java:209)
>     [junit] 	at org.apache.tools.ant.util.DOMElementWriter.write(DOMElementWriter.java:222)
>     [junit] 	at org.apache.tools.ant.util.DOMElementWriter.write(DOMElementWriter.java:222)
>     [junit] 	at org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter.endTestSuite(XMLJUnitResultFormatter.java:188)
>     [junit] 	at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.fireEndTestSuite(JUnitTestRunner.java:840)
>     [junit] 	at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:575)
>     [junit] 	at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:1179)
>     [junit] 	at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:1030)
>     [junit] Running org.apache.derby.PackagePrivateTestSuite
>     [junit] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0 sec
>     [junit] Test org.apache.derby.PackagePrivateTestSuite FAILED (crashed)
> {noformat}
> I can reproduce these failures in my environment by running the junit-single target with
Ant 1.9.4. For example:
> {noformat}
> ant -Dderby.junit.testclass=org.apache.derbyTesting.unitTests.junit.FormatableBitSetTest
junit-single
> {noformat}
> If I use an older Ant version (I've tried 1.9.0 and 1.8.2) it does not fail.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message