db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r373011 - /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/RunTest.java
Date Fri, 27 Jan 2006 22:31:50 GMT
Author: djd
Date: Fri Jan 27 14:31:45 2006
New Revision: 373011

URL: http://svn.apache.org/viewcvs?rev=373011&view=rev
Log:
DERBY-885 Disable running with the security manager for useProcess=false
for j9 vms. Causes some unexpected execption that needs to be investigated
and halts test runs. This is a workaround that will cause dml160 to fail
with j9 vms, as it checks to see a security manager is installed.
Will be investigating, but this will allow derbyall runs to complete.

Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/RunTest.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/RunTest.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/RunTest.java?rev=373011&r1=373010&r2=373011&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/RunTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/RunTest.java
Fri Jan 27 14:31:45 2006
@@ -2409,9 +2409,11 @@
         }
         
         ps.close();
-        
-        if (installedSecurityManager)
+         if (installedSecurityManager)
+        {
         	System.setSecurityManager(null);
+        	
+        }
         // Reset System.out and System.err
         System.setOut(stdout);
         System.setErr(stderr);
@@ -2479,16 +2481,18 @@
      */
     private static boolean installSecurityManager() throws ClassNotFoundException, IOException
     {
+    	// SecurityManager not currently work with j9 and useProcess=false
+    	// need to disable to allow tests to run.
+    	if (jvmName.startsWith("j9"))
+    		return false;
+    	
     	boolean installedSecurityManager = false;
     	// Set up the SecurityManager in this JVM for this test.
     	boolean haveSecurityManagerAlready = System.getSecurityManager() != null;
         if (runWithoutSecurityManager)
         {
-        	// Test doesn't run with a SecurityManager but there's
-        	// a chance that a previous test will have installed one.
-        	// Currently when running with useProcess=false we install
-        	// the SecurityManager on the first test that requires it
-        	// and leave it there.
+        	// Test doesn't run with a SecurityManager,
+        	// print a warning if one is there already.
         	if (haveSecurityManagerAlready)
         		System.out.println(
         				"noSecurityManager=true,useProcess=false but SecurityManager installed by previous
test");



Mime
View raw message