db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r329310 - in /db/derby/code/trunk/java/testing/org/apache/derbyTesting: functionTests/tests/store/ functionTests/tests/unit/ unitTests/store/
Date Fri, 28 Oct 2005 21:40:49 GMT
Author: djd
Date: Fri Oct 28 14:40:43 2005
New Revision: 329310

URL: http://svn.apache.org/viewcvs?rev=329310&view=rev
Log:
DERBY-615 In unit tests use System.setProperty() instead of System.getProperties().put()
to set system properties. Means more specific permissions can be granted in the policy file.
Disable testsqldecimal from running with the security manager due to DERBY-616.

Added:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/testsqldecimal_app.properties
  (with props)
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/unit/T_CipherBlowfish_app.properties
  (with props)
Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/copyfiles.ant
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/store/T_RecoverBadLog.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/store/T_RecoverFullLog.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/store/T_SortController.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/copyfiles.ant
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/copyfiles.ant?rev=329310&r1=329309&r2=329310&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/copyfiles.ant
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/copyfiles.ant
Fri Oct 28 14:40:43 2005
@@ -112,6 +112,7 @@
 empty.data
 short.data
 testsqldecimal.sql
+testsqldecimal_app.properties
 testsqldecimal_derby.properties
 TestDurabilityProperty_app.properties
 updatecursorlocks.subsql

Added: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/testsqldecimal_app.properties
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/testsqldecimal_app.properties?rev=329310&view=auto
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/testsqldecimal_app.properties
(added)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/testsqldecimal_app.properties
Fri Oct 28 14:40:43 2005
@@ -0,0 +1,7 @@
+
+usedefaults=true
+
+#exclude with SecurityManager - DERBY-616
+noSecurityManager=true
+
+

Propchange: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/testsqldecimal_app.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Added: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/unit/T_CipherBlowfish_app.properties
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/unit/T_CipherBlowfish_app.properties?rev=329310&view=auto
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/unit/T_CipherBlowfish_app.properties
(added)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/unit/T_CipherBlowfish_app.properties
Fri Oct 28 14:40:43 2005
@@ -0,0 +1,7 @@
+
+
+usedefaults=true
+
+#exclude with SecurityManager for now
+noSecurityManager=true
+

Propchange: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/unit/T_CipherBlowfish_app.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/store/T_RecoverBadLog.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/store/T_RecoverBadLog.java?rev=329310&r1=329309&r2=329310&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/store/T_RecoverBadLog.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/store/T_RecoverBadLog.java
Fri Oct 28 14:40:43 2005
@@ -507,7 +507,7 @@
 			if(!checksumTest)
 			{
 				SanityManager.DEBUG_SET(LogToFile.TEST_LOG_INCOMPLETE_LOG_WRITE);
-				System.getProperties().put(LogToFile.TEST_LOG_PARTIAL_LOG_WRITE_NUM_BYTES, Integer.toString(numcol*20));
+				System.setProperty(LogToFile.TEST_LOG_PARTIAL_LOG_WRITE_NUM_BYTES, Integer.toString(numcol*20));
 			}
 			
 			logFactory.flushAll();
@@ -642,7 +642,7 @@
 			if(!checksumTest)
 			{
 				SanityManager.DEBUG_SET(LogToFile.TEST_LOG_INCOMPLETE_LOG_WRITE);
-				System.getProperties().put(LogToFile.TEST_LOG_PARTIAL_LOG_WRITE_NUM_BYTES,Integer.toString(numcol*20));
+				System.setProperty(LogToFile.TEST_LOG_PARTIAL_LOG_WRITE_NUM_BYTES,Integer.toString(numcol*20));
 			}
 
 			logFactory.flushAll();
@@ -1055,7 +1055,7 @@
 			if(!checksumTest)
 			{
 				SanityManager.DEBUG_SET(LogToFile.TEST_LOG_INCOMPLETE_LOG_WRITE);
-				System.getProperties().put(LogToFile.TEST_LOG_PARTIAL_LOG_WRITE_NUM_BYTES, "200");
+				System.setProperty(LogToFile.TEST_LOG_PARTIAL_LOG_WRITE_NUM_BYTES, "200");
 			}
 			logFactory.flushAll();
 
@@ -1267,7 +1267,7 @@
 			if(!checksumTest)
 			{
 				SanityManager.DEBUG_SET(LogToFile.TEST_LOG_INCOMPLETE_LOG_WRITE);
-				System.getProperties().put(LogToFile.TEST_LOG_PARTIAL_LOG_WRITE_NUM_BYTES, Integer.toString(11));
+				System.setProperty(LogToFile.TEST_LOG_PARTIAL_LOG_WRITE_NUM_BYTES, Integer.toString(11));
 			}
 
 			logFactory.flushAll();
@@ -1408,7 +1408,7 @@
 			if(!checksumTest)
 			{
 				SanityManager.DEBUG_SET(LogToFile.TEST_LOG_INCOMPLETE_LOG_WRITE);
-				System.getProperties().put(LogToFile.TEST_LOG_PARTIAL_LOG_WRITE_NUM_BYTES, Integer.toString(3));
+				System.setProperty(LogToFile.TEST_LOG_PARTIAL_LOG_WRITE_NUM_BYTES, Integer.toString(3));
 			}
 			logFactory.flushAll();
 
@@ -1547,7 +1547,7 @@
 			if(!checksumTest)
 			{
 				SanityManager.DEBUG_SET(LogToFile.TEST_LOG_INCOMPLETE_LOG_WRITE);
-				System.getProperties().put(LogToFile.TEST_LOG_PARTIAL_LOG_WRITE_NUM_BYTES, Integer.toString((1997/2)
+ 16));
+				System.setProperty(LogToFile.TEST_LOG_PARTIAL_LOG_WRITE_NUM_BYTES, Integer.toString((1997/2)
+ 16));
 			}
 			logFactory.flushAll();
 			page.update(rh, bigrow.getRow(), (FormatableBitSet) null);
@@ -1686,7 +1686,7 @@
 			if(!checksumTest)
 			{
 				SanityManager.DEBUG_SET(LogToFile.TEST_LOG_INCOMPLETE_LOG_WRITE);
-				System.getProperties().put(LogToFile.TEST_LOG_PARTIAL_LOG_WRITE_NUM_BYTES, Integer.toString(1997+15));
+				System.setProperty(LogToFile.TEST_LOG_PARTIAL_LOG_WRITE_NUM_BYTES, Integer.toString(1997+15));
 			}
 			logFactory.flushAll();
 			page.update(rh, bigrow.getRow(), (FormatableBitSet) null);

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/store/T_RecoverFullLog.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/store/T_RecoverFullLog.java?rev=329310&r1=329309&r2=329310&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/store/T_RecoverFullLog.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/store/T_RecoverFullLog.java
Fri Oct 28 14:40:43 2005
@@ -241,7 +241,7 @@
 				if (recoveryFail)
 				{
 					SanityManager.DEBUG_SET(LogToFile.TEST_LOG_FULL);
-					System.getProperties().put(LogToFile.TEST_RECORD_TO_FILL_LOG, "10");
+					System.setProperty(LogToFile.TEST_RECORD_TO_FILL_LOG, "10");
 				}
 
 				if (!Monitor.startPersistentService(testService, startParams))
@@ -684,7 +684,7 @@
 	protected void fillUpLog() throws T_Fail, StandardException
 	{
 		SanityManager.DEBUG_SET(LogToFile.TEST_LOG_FULL);
-		System.getProperties().put(LogToFile.TEST_RECORD_TO_FILL_LOG, "1");
+		System.setProperty(LogToFile.TEST_RECORD_TO_FILL_LOG, "1");
 
 		Transaction t = t_util.t_startTransaction();
 		try

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/store/T_SortController.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/store/T_SortController.java?rev=329310&r1=329309&r2=329310&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/store/T_SortController.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/store/T_SortController.java
Fri Oct 28 14:40:43 2005
@@ -67,9 +67,7 @@
 	}
 
 	private void setSortBufferSize(String buf_length) {
-		Properties p = System.getProperties();
-		p.put("derby.storage.sortBufferMax", buf_length);
-		System.setProperties(p);
+		System.setProperty("derby.storage.sortBufferMax", buf_length);
 	}
 
 	/*



Mime
View raw message