db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From myrn...@apache.org
Subject svn commit: r1462681 - in /db/derby/code/branches/10.8: ./ java/client/org/apache/derby/client/net/ java/testing/org/apache/derbyTesting/functionTests/master/ java/testing/org/apache/derbyTesting/functionTests/suites/ java/testing/org/apache/derbyTesti...
Date Sat, 30 Mar 2013 00:38:22 GMT
Author: myrnavl
Date: Sat Mar 30 00:38:21 2013
New Revision: 1462681

URL: http://svn.apache.org/r1462681
Log:
DERBY-3838; Convert derbynet/DerbyNetAutoStart to JUnit
  backporting revision 1462304 and 1462677 from 10.9.

Added:
    db/derby/code/branches/10.8/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/DerbyNetAutoStartTest.java
      - copied, changed from r1462304, db/derby/code/branches/10.9/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/DerbyNetAutoStartTest.java
Removed:
    db/derby/code/branches/10.8/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetAutoStart.out
    db/derby/code/branches/10.8/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/DerbyNetAutoStart.java
    db/derby/code/branches/10.8/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/DerbyNetAutoStart_app.properties
Modified:
    db/derby/code/branches/10.8/   (props changed)
    db/derby/code/branches/10.8/java/client/org/apache/derby/client/net/NetCursor.java   (props
changed)
    db/derby/code/branches/10.8/java/testing/org/apache/derbyTesting/functionTests/suites/DerbyNetClientRemote.exclude
    db/derby/code/branches/10.8/java/testing/org/apache/derbyTesting/functionTests/suites/DerbyNetClientUseprocess.exclude
    db/derby/code/branches/10.8/java/testing/org/apache/derbyTesting/functionTests/suites/DerbyNetRemote.exclude
    db/derby/code/branches/10.8/java/testing/org/apache/derbyTesting/functionTests/suites/DerbyNetUseprocess.exclude
    db/derby/code/branches/10.8/java/testing/org/apache/derbyTesting/functionTests/suites/derbynetclientmats.runall
    db/derby/code/branches/10.8/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/_Suite.java
    db/derby/code/branches/10.8/java/testing/org/apache/derbyTesting/junit/TestConfiguration.java

Propchange: db/derby/code/branches/10.8/
------------------------------------------------------------------------------
  Merged /db/derby/code/branches/10.9:r1462304,1462677
  Merged /db/derby/code/trunk:r1461415

Propchange: db/derby/code/branches/10.8/java/client/org/apache/derby/client/net/NetCursor.java
------------------------------------------------------------------------------
  Merged /db/derby/code/branches/10.9/java/client/org/apache/derby/client/net/NetCursor.java:r1462304,1462677

Modified: db/derby/code/branches/10.8/java/testing/org/apache/derbyTesting/functionTests/suites/DerbyNetClientRemote.exclude
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.8/java/testing/org/apache/derbyTesting/functionTests/suites/DerbyNetClientRemote.exclude?rev=1462681&r1=1462680&r2=1462681&view=diff
==============================================================================
--- db/derby/code/branches/10.8/java/testing/org/apache/derbyTesting/functionTests/suites/DerbyNetClientRemote.exclude
(original)
+++ db/derby/code/branches/10.8/java/testing/org/apache/derbyTesting/functionTests/suites/DerbyNetClientRemote.exclude
Sat Mar 30 00:38:21 2013
@@ -13,7 +13,6 @@
 # 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
-# derbynet/DerbyNetAutoStart - tries to start networkserver
 # lang/wisconsin - optimization is quite different when running remote server.
 # junitTests/derbyNet/CompatibilityTest.java - tries to start and shutdown the server.
 # stress/stress.multi - attempts to connect to localhost.
@@ -23,7 +22,6 @@ derbynet/dblook_test_net.java
 derbynet/dblook_test_net_territory.java
 derbynet/maxthreads.java
 derbynet/timeslice.java
-derbynet/DerbyNetAutoStart.java
 lang/wisconsin.java
 junitTests/derbyNet/CompatibilityTest.java
 stress/stress.multi

Modified: db/derby/code/branches/10.8/java/testing/org/apache/derbyTesting/functionTests/suites/DerbyNetClientUseprocess.exclude
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.8/java/testing/org/apache/derbyTesting/functionTests/suites/DerbyNetClientUseprocess.exclude?rev=1462681&r1=1462680&r2=1462681&view=diff
==============================================================================
--- db/derby/code/branches/10.8/java/testing/org/apache/derbyTesting/functionTests/suites/DerbyNetClientUseprocess.exclude
(original)
+++ db/derby/code/branches/10.8/java/testing/org/apache/derbyTesting/functionTests/suites/DerbyNetClientUseprocess.exclude
Sat Mar 30 00:38:21 2013
@@ -3,7 +3,6 @@
 # jdbcapi/HoldabilityTest.junit - test causes subsequent tests to fail because of missing
 #     File permission
 # junitTests/derbyNet/CompatibilityTest.java - exits the suite
-# derbynet/DerbyNetAutoStart.java - exits the suite...
 # derbynet/dblook_test_net.java - expects different dir structure
 # derbynet/dblook_test_net_territory.java - expects different dir structure
 # stress/stress.multi - exits suite
@@ -13,7 +12,6 @@
 #
 jdbcapi/HoldabilityTest.junit
 junitTests/derbyNet/CompatibilityTest.java
-derbynet/DerbyNetAutoStart.java
 derbynet/dblook_test_net.java
 derbynet/dblook_test_net_territory.java
 stress/stress.multi

Modified: db/derby/code/branches/10.8/java/testing/org/apache/derbyTesting/functionTests/suites/DerbyNetRemote.exclude
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.8/java/testing/org/apache/derbyTesting/functionTests/suites/DerbyNetRemote.exclude?rev=1462681&r1=1462680&r2=1462681&view=diff
==============================================================================
--- db/derby/code/branches/10.8/java/testing/org/apache/derbyTesting/functionTests/suites/DerbyNetRemote.exclude
(original)
+++ db/derby/code/branches/10.8/java/testing/org/apache/derbyTesting/functionTests/suites/DerbyNetRemote.exclude
Sat Mar 30 00:38:21 2013
@@ -12,7 +12,6 @@
 # derbynet/maxthreads - 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
 # be started with a specific property. see DERBY-928 for reference
 # lang/wisconsin - optimization is quite different when running remote server.
 # junitTests/derbyNet/CompatibilityTest.java - tries to start and shutdown the server
@@ -22,6 +21,5 @@ derbynet/dblook_test_net.java
 derbynet/dblook_test_net_territory.java
 derbynet/maxthreads.java
 derbynet/timeslice.java
-derbynet/DerbyNetAutoStart.java
 lang/wisconsin.java
 junitTests/derbyNet/CompatibilityTest.java

Modified: db/derby/code/branches/10.8/java/testing/org/apache/derbyTesting/functionTests/suites/DerbyNetUseprocess.exclude
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.8/java/testing/org/apache/derbyTesting/functionTests/suites/DerbyNetUseprocess.exclude?rev=1462681&r1=1462680&r2=1462681&view=diff
==============================================================================
--- db/derby/code/branches/10.8/java/testing/org/apache/derbyTesting/functionTests/suites/DerbyNetUseprocess.exclude
(original)
+++ db/derby/code/branches/10.8/java/testing/org/apache/derbyTesting/functionTests/suites/DerbyNetUseprocess.exclude
Sat Mar 30 00:38:21 2013
@@ -3,7 +3,6 @@
 # 
 # jdbcapi/HoldabilityTest.junit - causes subsequent tests to fail because of missing
 #     File permissions
-# derbynet/DerbyNetAutoStart.java - exits suite...
 # derbynet/dblook_test_net.java - fails, test misses properties
 # derbynet/dblook_test_net_territory.java - fails, test misses properties
 # derbynet/runtimeinfo.java - fails with already existing threads (maybe intermittent)
@@ -12,7 +11,6 @@
 #
 jdbcapi/maxfieldsize.java
 jdbcapi/HoldabilityTest.junit
-derbynet/DerbyNetAutoStart.java
 derbynet/dblook_test_net.java
 derbynet/dblook_test_net_territory.java
 derbynet/runtimeinfo.java

Modified: db/derby/code/branches/10.8/java/testing/org/apache/derbyTesting/functionTests/suites/derbynetclientmats.runall
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.8/java/testing/org/apache/derbyTesting/functionTests/suites/derbynetclientmats.runall?rev=1462681&r1=1462680&r2=1462681&view=diff
==============================================================================
--- db/derby/code/branches/10.8/java/testing/org/apache/derbyTesting/functionTests/suites/derbynetclientmats.runall
(original)
+++ db/derby/code/branches/10.8/java/testing/org/apache/derbyTesting/functionTests/suites/derbynetclientmats.runall
Sat Mar 30 00:38:21 2013
@@ -1,6 +1,5 @@
 junitTests/derbyNet/CompatibilityTest.java
 derbynet/dblook_test_net.java
 derbynet/dblook_test_net_territory.java
-derbynet/DerbyNetAutoStart.java
 derbynet/testProtocol.java
 lang/wisconsin.java

Copied: db/derby/code/branches/10.8/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/DerbyNetAutoStartTest.java
(from r1462304, db/derby/code/branches/10.9/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/DerbyNetAutoStartTest.java)
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.8/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/DerbyNetAutoStartTest.java?p2=db/derby/code/branches/10.8/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/DerbyNetAutoStartTest.java&p1=db/derby/code/branches/10.9/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/DerbyNetAutoStartTest.java&r1=1462304&r2=1462681&rev=1462681&view=diff
==============================================================================
--- db/derby/code/branches/10.9/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/DerbyNetAutoStartTest.java
(original)
+++ db/derby/code/branches/10.8/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/DerbyNetAutoStartTest.java
Sat Mar 30 00:38:21 2013
@@ -42,6 +42,7 @@ import org.apache.derby.drda.NetworkServ
 import org.apache.derbyTesting.functionTests.util.PrivilegedFileOpsForTests;
 import org.apache.derbyTesting.junit.BaseJDBCTestCase;
 import org.apache.derbyTesting.junit.Derby;
+import org.apache.derbyTesting.junit.JDBC;
 import org.apache.derbyTesting.junit.NetworkServerTestSetup;
 import org.apache.derbyTesting.junit.TestConfiguration;
 
@@ -326,17 +327,19 @@ public class DerbyNetAutoStartTest exten
     } // end of checkLog
 
     public static Test suite() {
-        TestSuite suite = new TestSuite("DerbyNetAutoStartTest");
-        suite.addTest(baseSuite("DerbyNetAutoStartTest:embedded"));
-        return suite;
+        // Need derbynet.jar in the classpath, 
+        // and cannot run with ME/JSR169/cdc profile
+        if (JDBC.vmSupportsJDBC3() && Derby.hasServer()) {
+        	TestSuite suite = new TestSuite("DerbyNetAutoStartTest");
+        	suite.addTest(baseSuite("DerbyNetAutoStartTest:embedded"));
+        	return suite;
+        } else {
+            return new TestSuite("DerbyNetAutoStartTest.empty");
+        }
     }
 
     private static Test baseSuite(String name) {
-
         TestSuite suite = new TestSuite(name);
-        // Need derbynet.jar in the classpath, and cannot run with ME/JSR169/cdc profile
-        if (!Derby.hasServer())
-            return suite;
         // Adds all tests that can run with baseport set or not.
         suite.addTestSuite(DerbyNetAutoStartTest.class);
         if (getSystemProperty("derby.tests.basePort") != null )

Modified: db/derby/code/branches/10.8/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/_Suite.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.8/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/_Suite.java?rev=1462681&r1=1462680&r2=1462681&view=diff
==============================================================================
--- db/derby/code/branches/10.8/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/_Suite.java
(original)
+++ db/derby/code/branches/10.8/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/_Suite.java
Sat Mar 30 00:38:21 2013
@@ -65,6 +65,7 @@ public class _Suite extends BaseTestCase
         suite.addTest(GetCurrentPropertiesTest.suite());
         suite.addTest(Utf8CcsidManagerTest.suite());
         suite.addTest(Utf8CcsidManagerClientTest.suite());
+        suite.addTest(DerbyNetAutoStartTest.suite());
 
         // Disabled due to "java.sql.SQLSyntaxErrorException: The class
         // 'org.apache.derbyTesting.functionTests.tests.derbynet.checkSecMgr'

Modified: db/derby/code/branches/10.8/java/testing/org/apache/derbyTesting/junit/TestConfiguration.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.8/java/testing/org/apache/derbyTesting/junit/TestConfiguration.java?rev=1462681&r1=1462680&r2=1462681&view=diff
==============================================================================
--- db/derby/code/branches/10.8/java/testing/org/apache/derbyTesting/junit/TestConfiguration.java
(original)
+++ db/derby/code/branches/10.8/java/testing/org/apache/derbyTesting/junit/TestConfiguration.java
Sat Mar 30 00:38:21 2013
@@ -79,7 +79,7 @@ public final class TestConfiguration {
      * page at  http://wiki.apache.org/db-derby/DerbyJUnitTesting
      * need to be updated. 
      */
-    private final static int MAX_PORTS_USED = 20;
+    private final static int MAX_PORTS_USED = 22;
     
     /** This is the base port. This does NOT change EVER during the run of a suite.
      *	It is set using the property derby.tests.basePort and it is set to default when
@@ -1498,6 +1498,10 @@ public final class TestConfiguration {
         return hostName;
     }
 
+    public static int getBasePort() {
+        return basePort;
+    }
+
     /**
      * Get port number for network server.
      * 



Mime
View raw message