You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by dj...@apache.org on 2006/02/03 16:14:11 UTC

svn commit: r374683 - in /db/derby/code/trunk/java: engine/org/apache/derby/impl/store/raw/log/ testing/ testing/org/apache/derbyTesting/functionTests/harness/ testing/org/apache/derbyTesting/functionTests/util/

Author: djd
Date: Fri Feb  3 07:14:07 2006
New Revision: 374683

URL: http://svn.apache.org/viewcvs?rev=374683&view=rev
Log:
DERBY-891 Change db2j and csinfo properties to have consistent derbyTesting prefix.
Contributed by Myrna van Lunteren <m....@gmail.com>

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/log/LogToFile.java
    db/derby/code/trunk/java/testing/README.htm
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/jvm.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/util/derby_tests.policy

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/log/LogToFile.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/log/LogToFile.java?rev=374683&r1=374682&r2=374683&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/log/LogToFile.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/log/LogToFile.java Fri Feb  3 07:14:07 2006
@@ -4314,7 +4314,7 @@
 	  out, only used when TEST_LOG_INCOMPLETE_LOG_WRITE is on.  Default is 1
 	  byte.
 	*/
-	public static final String TEST_LOG_PARTIAL_LOG_WRITE_NUM_BYTES = SanityManager.DEBUG ? "db2j.unittest.partialLogWrite" : null;
+	public static final String TEST_LOG_PARTIAL_LOG_WRITE_NUM_BYTES = SanityManager.DEBUG ? "derbyTesting.unittest.partialLogWrite" : null;
 
 	/**
 	  Set to true if we want to simulate a log full condition
@@ -4336,7 +4336,7 @@
 	  simulated to be full.
 	*/
 	public static final String TEST_RECORD_TO_FILL_LOG = 
-        SanityManager.DEBUG ? "db2j.unittest.recordToFillLog" : null;
+        SanityManager.DEBUG ? "derbyTesting.unittest.recordToFillLog" : null;
 
 	/**
 	 * Set to true if we want to simulate max possible log file number is 

Modified: db/derby/code/trunk/java/testing/README.htm
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/README.htm?rev=374683&r1=374682&r2=374683&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/README.htm (original)
+++ db/derby/code/trunk/java/testing/README.htm Fri Feb  3 07:14:07 2006
@@ -1531,27 +1531,29 @@
 SecurityManager.</p>
   </li>
   <li>
-    <p>Client side JVM, this is the JVM executing the JDBC calls against any Derby driver.
+    <p>Client side JVM, this is the JVM executing the JDBC calls
+against any Derby driver.
 Installs a SecurityManager unless:</p>
   </li>
-  <UL>
-  <li>
-    <p><font face="Courier New"><font size="2"><font color="#000000">noSecurityManager=</font><font
+  <ul>
+    <li>
+      <p><font face="Courier New"><font size="2"><font color="#000000">noSecurityManager=</font><font
  color="#2a00ff">true </font><font size="3"><font
  face="Times New Roman, serif"><font color="#000000">in the test's
 _app.properties file.Used to disable individual tests that cannot run
 under the security manager, or if the test has a functional requirement
 not to run with the SecurityManager. Ideally, few tests will have this
 property set. Any disabling of the SecurityManager for a test requires
-a comment in the test's _app.properties file indicating why the test cannot run under the SecurityManager.
-</font></font></font></font></font></p>
-  </li>
-  <li>
-    <p><font color="#000000"><font face="Times New Roman, serif"><font
+a comment in the test's _app.properties file indicating why the test
+cannot run under the SecurityManager.
+      </font></font></font></font></font></p>
+    </li>
+    <li>
+      <p><font color="#000000"><font face="Times New Roman, serif"><font
  size="3">Client JDBC driver is DB2's Universal driver for JDBC.
 Currently does not install a SecurityManager, no technical reasons,
 just has not been done.</font></font></font></p>
-  </li>
+    </li>
   </ul>
 </ul>
 <h3><a name="hostName"></a><br>
@@ -1588,9 +1590,11 @@
     <tr>
       <td style="vertical-align: top;">java -Djava.security.manager
 -Djava.security.policy=derby_tests.policy
--Dcsinfo.codeclasses=file:/derby/classes/
--Dcsinfo.codedir=/derby/classes -Dcsinfo.serverhost=localhost
--Dcsinfo.trustedhost=localhost -Dcsinfo.codejar=file://unused/
+-DderbyTesting.codeclasses=file:/derby/classes/
+-DderbyTesting.codedir=/derby/classes
+-DderbyTesting.serverhost=localhost
+-DderbyTesting.clienthost=localhost
+-DderbyTesting.codejar=file://unused/
 org.apache.derby.drda.NetworkServerControl -h 0.0.0.0 start<br>
       <small>where /derbyt/classes is the directory where either the
 classes, can be found</small><br>
@@ -1608,9 +1612,11 @@
       <td style="vertical-align: top;">java
 -Dderby.system.home=/home/derbytst/ns -Djava.security.manager
 -Djava.security.policy=/home/derbytst/ns/derby_tests.policy
--Dcsinfo.codejar=file:/derby/tstbld/
--Dcsinfo.codedir=/derby/tstbld -Dcsinfo.serverhost=localhost
--Dcsinfo.trustedhost=localhost -Dcsinfo.codeclasses=file://unused/
+-DderbyTesting.codejar=file:/derby/tstbld/
+-DderbyTesting.codedir=/derby/tstbld
+-DderbyTesting.serverhost=localhost
+-DderbyTesting.clienthost=localhost
+-DderbyTesting.codeclasses=file://unused/
 org.apache.derby.drda.NetworkServerControl -h 0.0.0.0 start<br>
       <small>where /derbyt/tstbld&nbsp; is the directory where
 derbynet.jar is found and home/derbytst/ns is the directory where your

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/jvm.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/jvm.java?rev=374683&r1=374682&r2=374683&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/jvm.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/jvm.java Fri Feb  3 07:14:07 2006
@@ -372,18 +372,20 @@
 		D.addElement("java.security.manager");
 		D.addElement("java.security.policy=" + pf.getAbsolutePath());
 		
-		String codebaseType = isJar[0] ? "csinfo.codejar" : "csinfo.codeclasses";
-		String unusedType = isJar[0] ? "csinfo.codeclasses" : "csinfo.codejar";
+		String codebaseType = isJar[0] ? "derbyTesting.codejar" : "derbyTesting.codeclasses";
+		String unusedType = isJar[0] ? "derbyTesting.codeclasses" : "derbyTesting.codejar";
 
 		// URL of the codebase
 		D.addElement(codebaseType + "=" + cb.toURL());
 		// file path to the codebase
-		D.addElement("csinfo.codedir=" + cb.getAbsolutePath());
+		D.addElement("derbyTesting.codedir=" + cb.getAbsolutePath());
 		String hostName = (System.getProperty("hostName"));
 		if (hostName == null)
 			hostName="localhost";
-		D.addElement("csinfo.serverhost=" + hostName);
-		D.addElement("csinfo.trustedhost=" + hostName);	 
+		D.addElement("derbyTesting.serverhost=" + hostName);
+		// in the case of testing with a remote host, this is irrelevant, 
+		// when testing 'normal' it is also localhost:
+		D.addElement("derbyTesting.clienthost=" + hostName);	 
 		
 		// add an invalid path to the unused type 
 		D.addElement(unusedType + "=file://unused/");

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/util/derby_tests.policy
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/util/derby_tests.policy?rev=374683&r1=374682&r2=374683&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/util/derby_tests.policy (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/util/derby_tests.policy Fri Feb  3 07:14:07 2006
@@ -4,23 +4,29 @@
 //
 // The test harness sets up three variables used by this policy file
 //
-// csinfo.codejar - URL to the jar files when they are in the classpath
-// csinfo.codeclasses - URL to the classes directory when it is in the classpath
+// derbyTesting.codejar - URL to the jar files when they are in the classpath
+// derbyTesting.codeclasses - URL to the classes directory when it is in the classpath
 //
-// Only one of csinfo.codejar and csinfo.codeclasses will be valid, the
+// Only one of derbyTesting.codejar and derbyTesting.codeclasses will be valid, the
 // other will be set to a bogus URL like file://unused
 //
-// csinfo.codedir - File location of either csinfo.codejar or csinfo.codejar.
-// Only required due to a BUG.
+// derbyTesting.codedir - File location of either derbyTesting.codejar or derbyTesting.codeclasses.
+// Only required due to a BUG (see below for more info).
+//
+// 
+// derbyTesting.serverhost - Host name or ip where network server is started 
+// derbyTesting.clienthost - specifies the clients ip address/hostName. 
+//     when testing with networkserver on a remote host, this needs to be passed in 
+//     with the NetworkServerControl start command
 
 //
 // Permissions for the embedded engine (derby.jar)
 //
-grant codeBase "${csinfo.codejar}derby.jar" {
+grant codeBase "${derbyTesting.codejar}derby.jar" {
   permission java.util.PropertyPermission "derby.*", "read";
   
   // for unit tests
-  permission java.util.PropertyPermission "db2j.unittest.*", "read";
+  permission java.util.PropertyPermission "derbyTesting.unittest.*", "read";
   
   permission java.lang.RuntimePermission "createClassLoader";
   
@@ -37,12 +43,12 @@
   permission java.io.FilePermission "${user.dir}${/}extout${/}-", "write";
   permission java.io.FilePermission "${user.dir}${/}extinout", "read,write";
   
-  // unit tests set this property (called from derbyTesting.jar through
-  // code in derby.jar
-  permission java.util.PropertyPermission "db2j.unittest.*", "write";
+  // unit tests (e.g. store/T_RecoverFullLog) set this property 
+  // (called from derbyTesting.jar through code in derby.jar)
+  permission java.util.PropertyPermission "derbyTesting.unittest.*", "write";
 
   // BUG DERBY-622 derbynet/sysinfo.java
-  permission java.io.FilePermission "${csinfo.codedir}${/}*", "read";
+  permission java.io.FilePermission "${derbyTesting.codedir}${/}*", "read";
   
   // sane=true, jdbcapi/secureUsers1.sql
   permission java.io.FilePermission "${user.dir}${/}CloudLDAP.out", "write"; 
@@ -57,14 +63,14 @@
 //
 // Permissions for the network server (derbynet.jar)
 //
-grant codeBase "${csinfo.codejar}derbynet.jar" {
+grant codeBase "${derbyTesting.codejar}derbynet.jar" {
   
   // accept is needed for the server accepting connections
   // connect is needed for ping command (which is in the server jar)
   permission java.net.SocketPermission "127.0.0.1", "accept,connect";
   permission java.net.SocketPermission "localhost", "accept,connect";
-  permission java.net.SocketPermission "${csinfo.serverhost}", "accept,connect";
-  permission java.net.SocketPermission "${csinfo.trustedhost}", "accept,connect";
+  permission java.net.SocketPermission "${derbyTesting.clienthost}", "accept,connect";
+  permission java.net.SocketPermission "${derbyTesting.serverhost}", "accept,connect";
   
   // derbynet/NSinSameJVM uses this addres for its serverControl 
   permission java.net.SocketPermission "0.0.0.0:20000", "connect";
@@ -74,7 +80,7 @@
   permission java.io.FilePermission "${derby.system.home}${/}*", "write";  
   
   // BUG DERBY-622 derbynet/sysinfo.java
-  permission java.io.FilePermission "${csinfo.codedir}${/}*", "read";
+  permission java.io.FilePermission "${derbyTesting.codedir}${/}*", "read";
   
   // BUG DERBY-616 lang/wisconsin.sql & jdbcapi/maxfieldsize.java
   permission java.io.FilePermission "${derby.system.home}${/}wombat${/}tmp${/}-", "read, write, delete";
@@ -91,9 +97,10 @@
 //
 // Permissions for the network client (derbyclient.jar)
 //
-grant codeBase "${csinfo.codejar}derbyclient.jar" {
+grant codeBase "${derbyTesting.codejar}derbyclient.jar" {
   permission java.net.SocketPermission "127.0.0.1", "connect,resolve";
   permission java.net.SocketPermission "localhost", "connect,resolve";
+  permission java.net.SocketPermission "${derbyTesting.serverhost}", "connect,resolve";
 };
 
 //
@@ -101,7 +108,7 @@
 // Ideally this would be more secure, for now the
 // focus is on getting the engine & network server secure.
 //
-grant codeBase "${csinfo.codejar}derbytools.jar" {
+grant codeBase "${derbyTesting.codejar}derbytools.jar" {
   // Access all properties using System.getProperties
   permission java.util.PropertyPermission "*", "read, write";
   
@@ -109,7 +116,7 @@
   permission java.io.FilePermission "${user.dir}${/}-", "read";
   
   // ij needs permission to read the sql files in this jar
-  permission java.io.FilePermission "${csinfo.codedir}${/}derbyTesting.jar", "read";
+  permission java.io.FilePermission "${derbyTesting.codedir}${/}derbyTesting.jar", "read";
   
   // sane=true, jdbcapi/secureUsers1.sql
   permission java.io.FilePermission "${user.dir}${/}CloudLDAP.out", "write"; 
@@ -120,7 +127,7 @@
 // We are liberal here, it's not a goal to make the test harness
 // or tests secure.
 //
-grant codeBase "${csinfo.codejar}derbyTesting.jar" {
+grant codeBase "${derbyTesting.codejar}derbyTesting.jar" {
   // Access all properties using System.getProperties
   permission java.util.PropertyPermission "*", "read, write";
   
@@ -139,7 +146,7 @@
 //
 // super-set of the jar permissions for running out of the classes directory
 //
-grant codeBase "${csinfo.codeclasses}" {
+grant codeBase "${derbyTesting.codeclasses}" {
   // Access all properties using System.getProperties
   permission java.util.PropertyPermission "*", "read, write";
   
@@ -154,8 +161,8 @@
   // combination of client and server side.
   permission java.net.SocketPermission "127.0.0.1", "accept,connect,resolve";
   permission java.net.SocketPermission "localhost", "accept,connect,resolve";
-  permission java.net.SocketPermission "${csinfo.serverhost}", "accept";
-  permission java.net.SocketPermission "${csinfo.trustedhost}", "accept"; 
+  permission java.net.SocketPermission "${derbyTesting.clienthost}", "accept,connect";
+  permission java.net.SocketPermission "${derbyTesting.serverhost}", "connect,resolve";
   
   // derbynet/NSinSameJVM uses this addres for its serverControl 
   permission java.net.SocketPermission "0.0.0.0:20000", "connect";