db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fuzzylo...@apache.org
Subject svn commit: r358591 [1/6] - in /db/derby/code/trunk/java: drda/org/apache/derby/impl/drda/ testing/ testing/org/apache/derbyTesting/functionTests/harness/ testing/org/apache/derbyTesting/functionTests/master/ testing/org/apache/derbyTesting/functionTes...
Date Thu, 22 Dec 2005 17:29:08 GMT
Author: fuzzylogic
Date: Thu Dec 22 09:26:55 2005
New Revision: 358591

URL: http://svn.apache.org/viewcvs?rev=358591&view=rev
Log:
DERBY-413: Allow Network Server tests to be run against a server on a machine
other than localhost.

Committed for Myrna Van Lunteren <m.v.lunteren@gmail.com>

Added:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/DerbyNetClientRemote.exclude
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/DerbyNetRemote.exclude
Modified:
    db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/TestProto.java
    db/derby/code/trunk/java/testing/README.htm
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/NetServer.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/RunClass.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/RunList.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/RunSuite.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/RunTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/Sed.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/jvm.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/LOBTest.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/blobclob4BLOB.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/checkDriver.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/dataSourcePermissions_net.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/dbMetaDataJdbc30.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/forupdate.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/holdCursorExternalSortJDBC30.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/holdCursorIJ.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/holdCursorJDBC30.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/metadata.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/odbc_metadata.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/optimizerOverrides.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/secureUsers.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/secureUsersldap.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/supersimple.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/sysinfo.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/testSecMec.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/users.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/users2.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/wisconsin.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/LOBTest.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/blobclob4BLOB.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/checkDriver.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/dataSourcePermissions_net.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/dbMetaDataJdbc30.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/forupdate.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/holdCursorExternalSortJDBC30.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/holdCursorIJ.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/holdCursorJDBC30.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/metadata.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/odbc_metadata.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/optimizerOverrides.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/secureUsers.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/secureUsersldap.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/supersimple.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/sysinfo.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/testSecMec.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/testij.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/users.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/users2.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/wisconsin.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/xaSimplePositive.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/LOBTest.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/bestrowidentifier.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/blobclob4BLOB.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/checkDriver.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/dataSourcePermissions.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/dblook_test.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/forupdate.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/getCurrentProperties.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/holdCursorExternalSortJDBC30.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/holdCursorIJ.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/holdCursorJDBC30.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/j9_13/checkDriver.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/j9_22/checkDriver.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/maxthreads.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/optimizerOverrides.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/simpleScroll.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/supersimple.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/testProperties.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/testProtocol.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/testconnection.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/testij.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/timeslice.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/wisconsin.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/xaSimplePositive.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/derbynetmats.runall
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/DerbyNetAutoStart.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/NSinSameJVM.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/callable.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/checkSecMgr.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/copyfiles.ant
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/csPrepStmt.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/dataSourcePermissions_net.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/executeUpdate.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/maxthreads.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/prepStmt.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/protocol.tests
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/testProtocol.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/testSecMec.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/testconnection.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/testij.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/testij_sed.properties
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/timeslice.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/LOBTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/StmtCloseFunTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/Stream.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/autoGeneratedJdbc30.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/bestrowidentifier.sql
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/blobclob4BLOB.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/checkDriver.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/connectionJdbc20.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/dataSourcePermissions.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/lobStreams.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/maxfieldsize.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/metadata_test.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/nullSQLText.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/parameterMetaDataJdbc30.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/prepStmtMetaData.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/prepStmtNull.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/resultset.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/resultsetJdbc20.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/resultsetStream.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/rsgetXXXcolumnNames.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/savepointJdbc30.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/setTransactionIsolation.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/xaSimplePositive.sql
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/bug5054.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/declareGlobalTempTableJavaJDBC30.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/forupdate.sql
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/holdCursorIJ.sql
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/holdCursorJava.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/holdCursorJavaReflection.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/optimizerOverrides.sql
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/procedure.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/procedureJdbc30.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/scrollCursors2.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/simpleScroll.sql
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/supersimple.sql
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/unaryArithmeticDynamicParameter.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/updatableResultSet.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/wisconsin.sql
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/wisconsin_derby.properties
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/bootLock1.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/holdCursorExternalSortJDBC30.sql
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/holdCursorJDBC30.sql
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/dblook_test.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/util/TestUtil.java
    db/derby/code/trunk/java/tools/org/apache/derby/impl/tools/ij/xaHelper.java

Modified: db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/TestProto.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/TestProto.java?rev=358591&r1=358590&r2=358591&view=diff
==============================================================================
--- db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/TestProto.java (original)
+++ db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/TestProto.java Thu Dec 22 09:26:55
2005
@@ -107,6 +107,7 @@
 	private static final int WRITE_ENCODED_LDSTRING = 53;
 	private static final int CHECK_SQLCARD = 54;
 	private static final int MORE_DATA = 55;
+	private static final int COMPLETE_TEST = 56;
 
 	private static final String MULTIVAL_START = "MULTIVALSTART";
 	private static final String MULTIVAL_SEP = "SEP";
@@ -175,7 +176,21 @@
 	{
 		String prev_filename = current_filename;
 		current_filename = filename;
-		FileReader fr = new FileReader(filename);
+        	String hostName=getHostName();
+		FileReader fr;
+                if (!hostName.equals("localhost")) 
+		{
+			// if we're not on localhost, we must also be starting
+			// the server remotely, and useprocess=false, so, the location may
+			// be different.
+			String userdir =  System.getProperty("user.dir");
+			String sep =  System.getProperty("file.separator");
+			fr = new FileReader(userdir + sep + ".." + sep + filename);
+		}
+		else
+		{
+			fr = new FileReader(filename);
+		}
 		tkn = new StreamTokenizer(fr);
 		int val;
 		while ( (val = tkn.nextToken()) != StreamTokenizer.TT_EOF)
@@ -198,13 +213,14 @@
 	 */
 	private void getConnection() 
 	{
+        String hostName=getHostName();
 		try {
-            monitorSocket = new Socket("localhost",1527);
+            monitorSocket = new Socket(hostName,1527);
         } catch (UnknownHostException e) {
-            System.err.println("Don't know about host: localhost");
+            System.err.println("Don't know about host: " + hostName);
             System.exit(1);
         } catch (IOException e) {
-            System.err.println("Couldn't get I/O for the connection to: localhost");
+            System.err.println("Couldn't get I/O for the connection to: " + hostName);
             System.exit(1);
         }
         try
@@ -214,7 +230,7 @@
 		}
 		catch (IOException e)
         {
-            System.err.println("Couldn't get I/O for the connection to: localhost");
+            System.err.println("Couldn't get I/O for the connection to: " + hostName);
             System.exit(1);
         }
 	}
@@ -241,6 +257,13 @@
 		writer.reset(null);
 	}
 	/**
+	 * finish by cleaning up the last connection
+	 */
+	private void completeTest()
+	{
+		closeConnection();
+	}
+	/**
 	 * Initialize hashtable for commands and set up a table to translate from
 	 * the codepoint name to the codepoint value
 	 */
@@ -301,6 +324,7 @@
 		commandTable.put("writeencodedldstring", new Integer(WRITE_ENCODED_LDSTRING));
 		commandTable.put("checksqlcard", new Integer(CHECK_SQLCARD));
 		commandTable.put("moredata", new Integer(MORE_DATA));
+		commandTable.put("completetest", new Integer(COMPLETE_TEST));
 		
 		Integer key;
 		for (Enumeration e = codePointNameTable.keys(); e.hasMoreElements(); )
@@ -471,6 +495,9 @@
 			case CHECK_SQLCARD:
 				checkSQLCARD(getInt(), getString());
 				break;
+			case COMPLETE_TEST:
+				completeTest();
+				break;
 			case END_TEST:
 				// print that we passed the test if we haven't failed
 				if (failed == false)
@@ -956,5 +983,13 @@
 		}
 		// skip the rest of the SQLCARD
 		reader.skipBytes();
+	}
+
+	private static String getHostName()
+	{
+		String hostName = (System.getProperty("hostName"));
+		if (hostName == null)
+			hostName="localhost";
+		return hostName;
 	}
 }



Mime
View raw message