I started using cloudcover to run my tests on the App Engine. When I
added a test that uses JMock I got a SecurityException.
access denied (java.lang.RuntimePermission getClassLoader)
java.security.AccessControlException: access denied
(java.lang.RuntimePermission getClassLoader)
     at
java.security.AccessControlContext.checkPermission(AccessControlContext.java:
355)
     at
java.security.AccessController.checkPermission(AccessController.java:
567)
     at java.lang.SecurityManager.checkPermission(Unknown Source)
     at java.lang.ClassLoader.getSystemClassLoader(Unknown Source)
     at
org.jmock.internal.SearchingClassLoader.combineLoadersOf(SearchingClassLoader.java:
54)
     at
org.jmock.internal.SearchingClassLoader.combineLoadersOf(SearchingClassLoader.java:
32)
     at
org.jmock.lib.JavaReflectionImposteriser.imposterise(JavaReflectionImposteriser.java:
29)
     at org.jmock.Mockery.mock(Mockery.java:139)
     at org.jmock.Mockery.mock(Mockery.java:120)
     at
fspotcloud.server.control.ControllerTest.testGetCommand(ControllerTest.java:
20)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
Source)
     at java.lang.reflect.Method.invoke(Method.java:43)
     at junit.framework.TestCase.runTest(TestCase.java:154)
     at junit.framework.TestCase.runBare(TestCase.java:127)
     at junit.framework.TestResult$1.protect(TestResult.java:106)
     at junit.framework.TestResult.runProtected(TestResult.java:124)
     at junit.framework.TestResult.run(TestResult.java:109)
     at junit.framework.TestCase.run(TestCase.java:118)
     at junit.framework.TestSuite.runTest(TestSuite.java:208)
     at junit.framework.TestSuite.run(TestSuite.java:203)
     at
com.google.appengine.testing.cloudcover.harness.junit3.JUnit3TestHarness.runTest(JUnit3TestHarness.java:
58)
     at
com.google.appengine.testing.cloudcover.server.CloudCoverManager.runTest(CloudCoverManager.java:
240)

This is the offending test:
http://code.google.com/p/fspotcloud/source/browse/server/src/test/java/fspotcloud/server/control/ControllerTest.java?repo=java

You can see it happening here (live):
http://jfspotcloud.appspot.com/cloudcover.html
in the 'server' test suite.

This must have to do with Sandbox restrictions, does anyone know a
Mock-framework that has been known to work on App Engine?

Thank you,
Steven Speek

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to