db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From myrn...@apache.org
Subject svn commit: r1064388 - in /db/derby/code/branches/10.5: ./ java/testing/org/apache/derbyTesting/functionTests/master/ java/testing/org/apache/derbyTesting/functionTests/suites/ java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/ java/tes...
Date Fri, 28 Jan 2011 00:40:53 GMT
Author: myrnavl
Date: Fri Jan 28 00:40:52 2011
New Revision: 1064388

URL: http://svn.apache.org/viewvc?rev=1064388&view=rev
Log:
DERBY-3834; Convert derbynet/runtimeinfo to JUnit
DERBY-4307; testRunTests in RuntimeinfoTest fails periodically with Assertion
  failure checkin
  backporting to 10.5 of revisions 792001 and 792252 (from DERBY-3834) and
  794276 (from DERBY-4307).

Added:
    db/derby/code/branches/10.5/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/RuntimeInfoTest.java
      - copied, changed from r792001, db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/RuntimeInfoTest.java
    db/derby/code/branches/10.5/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/RuntimeInfoTest.policy
      - copied unchanged from r792001, db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/RuntimeInfoTest.policy
    db/derby/code/branches/10.5/java/testing/org/apache/derbyTesting/junit/LocaleTestSetup.java
      - copied unchanged from r792001, db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/LocaleTestSetup.java
Removed:
    db/derby/code/branches/10.5/java/testing/org/apache/derbyTesting/functionTests/master/runtimeinfo.out
    db/derby/code/branches/10.5/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/runtimeinfo.java
    db/derby/code/branches/10.5/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/runtimeinfo_app.properties
    db/derby/code/branches/10.5/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/runtimeinfo_sed.properties
Modified:
    db/derby/code/branches/10.5/   (props changed)
    db/derby/code/branches/10.5/java/testing/org/apache/derbyTesting/functionTests/suites/DerbyNetClientRemote.exclude
    db/derby/code/branches/10.5/java/testing/org/apache/derbyTesting/functionTests/suites/DerbyNetClientUseprocess.exclude
    db/derby/code/branches/10.5/java/testing/org/apache/derbyTesting/functionTests/suites/DerbyNetRemote.exclude
    db/derby/code/branches/10.5/java/testing/org/apache/derbyTesting/functionTests/suites/derbynetmats.runall
    db/derby/code/branches/10.5/java/testing/org/apache/derbyTesting/functionTests/suites/j9derbynetmats.runall
    db/derby/code/branches/10.5/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/_Suite.java
    db/derby/code/branches/10.5/java/testing/org/apache/derbyTesting/junit/NetworkServerTestSetup.java

Propchange: db/derby/code/branches/10.5/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Jan 28 00:40:52 2011
@@ -1,2 +1,2 @@
 /db/derby/code/branches/10.6:942027,957000,962738,965351,987678,1055601
-/db/derby/code/trunk:757811,764912,769596,769602,769606,769962,772090,772337,772449,772534,774281,777105,779681,782991,785131,785139,785163,785570,785662,788369,788670,788674,788968,789264,790218,791027,792434,793089,793588,794106,794303,794955,795166,795459,796020,796027,796316,796372,797147,798347,798742,800523,803548,803948,805696,808494,808850,809643,810860,812669,816531,816536,819006,822289,823659,824694,827505,829022,829410,830545,831304,831319,832379,833430,835286,881074,881444,882732,884163,885421,885659,887246,888311,892912,897161,898635,901165,901648,901760,902857,903108,905224,908418,908586,909176,910481,910511,911315,911793,915177,915733,916075,916897,917771,918152,918359,921028,927430,928065,929085,934474,936215,938959,940462,940469,942286,942476,942480,942587,946794,948045,948069,951346,951366,952138,952581,954748,955001,955634,956075,956445,956659,958163,959550,962716,965647,967304,980684,986689,986834,999119,1002291,1002682,1002853,1021426,1025795,1040658,105
 3724,1055169,1062096,1063809
+/db/derby/code/trunk:757811,764912,769596,769602,769606,769962,772090,772337,772449,772534,774281,777105,779681,782991,785131,785139,785163,785570,785662,788369,788670,788674,788968,789264,790218,791027,792001,792254,792434,793089,793588,794106,794276,794303,794955,795166,795459,796020,796027,796316,796372,797147,798347,798742,800523,803548,803948,805696,808494,808850,809643,810860,812669,816531,816536,819006,822289,823659,824694,827505,829022,829410,830545,831304,831319,832379,833430,835286,881074,881444,882732,884163,885421,885659,887246,888311,892912,897161,898635,901165,901648,901760,902857,903108,905224,908418,908586,909176,910481,910511,911315,911793,915177,915733,916075,916897,917771,918152,918359,921028,927430,928065,929085,934474,936215,938959,940462,940469,942286,942476,942480,942587,946794,948045,948069,951346,951366,952138,952581,954748,955001,955634,956075,956445,956659,958163,959550,962716,965647,967304,980684,986689,986834,999119,1002291,1002682,1002853,102142
 6,1025795,1040658,1053724,1055169,1062096,1063809

Modified: db/derby/code/branches/10.5/java/testing/org/apache/derbyTesting/functionTests/suites/DerbyNetClientRemote.exclude
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.5/java/testing/org/apache/derbyTesting/functionTests/suites/DerbyNetClientRemote.exclude?rev=1064388&r1=1064387&r2=1064388&view=diff
==============================================================================
--- db/derby/code/branches/10.5/java/testing/org/apache/derbyTesting/functionTests/suites/DerbyNetClientRemote.exclude
(original)
+++ db/derby/code/branches/10.5/java/testing/org/apache/derbyTesting/functionTests/suites/DerbyNetClientRemote.exclude
Fri Jan 28 00:40:52 2011
@@ -10,7 +10,6 @@
 # derbynet/dblook_test_net_territory because it tries to search derby.log, which is on
 #     the server machine
 # derbynet/maxthreads - tries to use NetworkServerControl statements
-# derbynet/runtimeinfo - tries to use NetworkServerControl statements
 # started with specific property set - DERBY928 for reference 
 # thus not suitable for remote server testing in its current form. - DERBY-928
 # derbynet/timeslice - tries to use NetworkServerControl statements
@@ -23,7 +22,6 @@ store/bootLock.java
 derbynet/dblook_test_net.java
 derbynet/dblook_test_net_territory.java
 derbynet/maxthreads.java
-derbynet/runtimeinfo.java
 derbynet/timeslice.java
 derbynet/DerbyNetAutoStart.java
 lang/wisconsin.java

Modified: db/derby/code/branches/10.5/java/testing/org/apache/derbyTesting/functionTests/suites/DerbyNetClientUseprocess.exclude
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.5/java/testing/org/apache/derbyTesting/functionTests/suites/DerbyNetClientUseprocess.exclude?rev=1064388&r1=1064387&r2=1064388&view=diff
==============================================================================
--- db/derby/code/branches/10.5/java/testing/org/apache/derbyTesting/functionTests/suites/DerbyNetClientUseprocess.exclude
(original)
+++ db/derby/code/branches/10.5/java/testing/org/apache/derbyTesting/functionTests/suites/DerbyNetClientUseprocess.exclude
Fri Jan 28 00:40:52 2011
@@ -7,7 +7,6 @@
 # derbynet/dblook_test_net.java - expects different dir structure
 # derbynet/dblook_test_net_territory.java - expects different dir structure
 # stress/stress.multi - exits suite
-# derbynet/runtimeinfo.java - different sessions
 # following fail for various reasons, many related to not being able to connect:
 #  lang/wisconsin.java
 #  jdbcapi/derbyStress.java
@@ -18,7 +17,6 @@ junitTests/derbyNet/CompatibilityTest.ja
 derbynet/DerbyNetAutoStart.java
 derbynet/dblook_test_net.java
 derbynet/dblook_test_net_territory.java
-derbynet/runtimeinfo.java
 stress/stress.multi
 lang/wisconsin.java
 jdbcapi/derbyStress.java

Modified: db/derby/code/branches/10.5/java/testing/org/apache/derbyTesting/functionTests/suites/DerbyNetRemote.exclude
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.5/java/testing/org/apache/derbyTesting/functionTests/suites/DerbyNetRemote.exclude?rev=1064388&r1=1064387&r2=1064388&view=diff
==============================================================================
--- db/derby/code/branches/10.5/java/testing/org/apache/derbyTesting/functionTests/suites/DerbyNetRemote.exclude
(original)
+++ db/derby/code/branches/10.5/java/testing/org/apache/derbyTesting/functionTests/suites/DerbyNetRemote.exclude
Fri Jan 28 00:40:52 2011
@@ -10,7 +10,6 @@
 # derbynet/dblook_test_net_territory because it tries to search derby.log, which is on
 #     the server machine
 # derbynet/maxthreads - tries to use NetworkServerControl statements
-# derbynet/runtimeinfo - tries to use NetworkServerControl statements
 # thus not suitable for remote server testing in its current form. - DERBY-928
 # derbynet/timeslice - tries to use NetworkServerControl statements
 # derbynet/DerbyNetAutoStart - tries to start networkserver
@@ -22,7 +21,6 @@ store/bootLock.java
 derbynet/dblook_test_net.java
 derbynet/dblook_test_net_territory.java
 derbynet/maxthreads.java
-derbynet/runtimeinfo.java
 derbynet/timeslice.java
 derbynet/DerbyNetAutoStart.java
 lang/wisconsin.java

Modified: db/derby/code/branches/10.5/java/testing/org/apache/derbyTesting/functionTests/suites/derbynetmats.runall
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.5/java/testing/org/apache/derbyTesting/functionTests/suites/derbynetmats.runall?rev=1064388&r1=1064387&r2=1064388&view=diff
==============================================================================
--- db/derby/code/branches/10.5/java/testing/org/apache/derbyTesting/functionTests/suites/derbynetmats.runall
(original)
+++ db/derby/code/branches/10.5/java/testing/org/apache/derbyTesting/functionTests/suites/derbynetmats.runall
Fri Jan 28 00:40:52 2011
@@ -1,7 +1,6 @@
 derbynet/dblook_test_net.java
 derbynet/dblook_test_net_territory.java
 derbynet/DerbyNetAutoStart.java
-derbynet/runtimeinfo.java
 derbynet/testProtocol.java
 lang/holdCursorIJ.sql
 lang/wisconsin.java

Modified: db/derby/code/branches/10.5/java/testing/org/apache/derbyTesting/functionTests/suites/j9derbynetmats.runall
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.5/java/testing/org/apache/derbyTesting/functionTests/suites/j9derbynetmats.runall?rev=1064388&r1=1064387&r2=1064388&view=diff
==============================================================================
--- db/derby/code/branches/10.5/java/testing/org/apache/derbyTesting/functionTests/suites/j9derbynetmats.runall
(original)
+++ db/derby/code/branches/10.5/java/testing/org/apache/derbyTesting/functionTests/suites/j9derbynetmats.runall
Fri Jan 28 00:40:52 2011
@@ -1,6 +1,5 @@
 derbynet/dblook_test_net.java
 derbynet/dblook_test_net_territory.java
-derbynet/runtimeinfo.java
 lang/holdCursorIJ.sql
 store/holdCursorExternalSortJDBC30.sql
 store/holdCursorJDBC30.sql

Copied: db/derby/code/branches/10.5/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/RuntimeInfoTest.java
(from r792001, db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/RuntimeInfoTest.java)
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.5/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/RuntimeInfoTest.java?p2=db/derby/code/branches/10.5/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/RuntimeInfoTest.java&p1=db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/RuntimeInfoTest.java&r1=792001&r2=1064388&rev=1064388&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/RuntimeInfoTest.java
(original)
+++ db/derby/code/branches/10.5/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/RuntimeInfoTest.java
Fri Jan 28 00:40:52 2011
@@ -45,14 +45,6 @@ import org.apache.derbyTesting.junit.Tes
 
 public class RuntimeInfoTest extends BaseJDBCTestCase {
 
-	private static String[] RuntimeinfoCmd = new String[] {
-			"org.apache.derby.drda.NetworkServerControl", "runtimeinfo",
-			"-p", String.valueOf(TestConfiguration.getCurrent().getPort()) };
-	private static String[] RuntimeinfoLocaleCmd = new String[] {
-			"-Duser.language=err", "-Duser.country=DE",
-			"org.apache.derby.drda.NetworkServerControl", "runtimeinfo",
-			"-p", String.valueOf(TestConfiguration.getCurrent().getPort()) };
-	
 	private static String POLICY_FILE_NAME=
     	"functionTests/tests/derbynet/RuntimeInfoTest.policy";
     private static String TARGET_POLICY_FILE_NAME="runtimeinfo.policy";
@@ -73,7 +65,7 @@ public class RuntimeInfoTest extends Bas
 	 * Creates a suite with two testcases, with and without some extra 
 	 * system properties.
 	 * 
-	 * @return
+	 * @return The test suite with both English and German locales.
 	 */
 	public static Test suite() {
 		TestSuite suite = new TestSuite("RuntimeInfoTest");
@@ -99,6 +91,9 @@ public class RuntimeInfoTest extends Bas
 	 * @throws Exception
 	 */
 	public void x_testRuntimeInfoWithActiveConn() throws Exception {
+		final String[] RuntimeinfoCmd = new String[] {
+			"org.apache.derby.drda.NetworkServerControl", "runtimeinfo",
+			"-p", String.valueOf(TestConfiguration.getCurrent().getPort()) };
 		Process p = execJavaCmd(RuntimeinfoCmd);
 		String output = sed(readProcessOutput(p));
 		
@@ -113,6 +108,12 @@ public class RuntimeInfoTest extends Bas
 	 */
 	public void x_testRuntimeInfoLocale() throws Exception {      
 		Connection conn1 = getConnection();
+		
+		final String[] RuntimeinfoLocaleCmd = new String[] {
+			"-Duser.language=err", "-Duser.country=DE",
+			"org.apache.derby.drda.NetworkServerControl", "runtimeinfo",
+			"-p", String.valueOf(TestConfiguration.getCurrent().getPort()) };
+		
 		// Now get a couple of connections with some prepared statements
 		Connection conn2 = openDefaultConnection();
 		PreparedStatement ps = prepareAndExecuteQuery(conn1,
@@ -336,7 +337,7 @@ public class RuntimeInfoTest extends Bas
 				"Gesamtspeicher: #####	Freier Speicher: #####");
 		germanOutputs.put("sedMemorySearch", "Gesamtspeicher: [0-9]*	Freier Speicher: [0-9]*");
 		germanOutputs.put("sedMemoryReplace", "Gesamtspeicher: #####	Freier Speicher: #####");
-		germanOutputs.put("RuntimeInfoLocaleString", "\tAnwsg-ID\t\tSQL-Text\n\t--------------\t------------\n\n\n\nSitzungsnummer");
+		germanOutputs.put("RuntimeInfoLocaleString", "\tAnwsg-ID\t\tSQL-Text\n\t-------------\t-----------\n\n\n\nSitzungsnummer");
 		
 		outputs = new HashMap();
 		outputs.put(englishLocale, englishOutputs);

Modified: db/derby/code/branches/10.5/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/_Suite.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.5/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/_Suite.java?rev=1064388&r1=1064387&r2=1064388&view=diff
==============================================================================
--- db/derby/code/branches/10.5/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/_Suite.java
(original)
+++ db/derby/code/branches/10.5/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/_Suite.java
Fri Jan 28 00:40:52 2011
@@ -55,6 +55,7 @@ public class _Suite extends BaseTestCase
         suite.addTest(SecureServerTest.suite());
         suite.addTest(SysinfoTest.suite());
         suite.addTest(SSLTest.suite());
+        suite.addTest(RuntimeInfoTest.suite());
         suite.addTest(NetIjTest.suite());
         suite.addTest(NSinSameJVMTest.suite());
         suite.addTest(NetworkServerControlClientCommandTest.suite());

Modified: db/derby/code/branches/10.5/java/testing/org/apache/derbyTesting/junit/NetworkServerTestSetup.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.5/java/testing/org/apache/derbyTesting/junit/NetworkServerTestSetup.java?rev=1064388&r1=1064387&r2=1064388&view=diff
==============================================================================
--- db/derby/code/branches/10.5/java/testing/org/apache/derbyTesting/junit/NetworkServerTestSetup.java
(original)
+++ db/derby/code/branches/10.5/java/testing/org/apache/derbyTesting/junit/NetworkServerTestSetup.java
Fri Jan 28 00:40:52 2011
@@ -617,7 +617,7 @@ final public class NetworkServerTestSetu
     {
         if ( !t.getClass().getName().equals( "java.lang.Exception" ) ) { return false; }
         
-        return ( t.getMessage().startsWith( "DRDA_NoIO.S:Could not connect to Derby Network
Server" ) );
+        return ( t.getMessage().startsWith( "DRDA_NoIO.S:" ) );
     }
     
     // return true if this is a drda error



Mime
View raw message