db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rick Hillegas <Richard.Hille...@Sun.COM>
Subject SecurityManager testing
Date Mon, 10 Apr 2006 17:19:05 GMT
In my work on DERBY-930, I have written a test which needs to figure out 
whether it is running against jar files or against the class path. This 
requires granting the following permission on the classtree:

  permission java.lang.RuntimePermission "getProtectionDomain";

This, in turn, breaks an existing test, RunClassPathTester. That test 
expects to get Protection Domain exceptions while loading some classes. 
How can I run both these tests under the SecurityManager? Is there an 
existing mechanism for, say, appending test-specific permissions to 
derby_testing.policy? If not, would this be an unreasonable way to solve 
this problem? Does anyone want to recommend a better way to solve this 
problem?

Thanks,
-Rick

Mime
View raw message