db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From myrn...@apache.org
Subject svn commit: r597751 - in /db/derby/code/branches/10.3: java/testing/org/apache/derbyTesting/functionTests/master/ java/testing/org/apache/derbyTesting/functionTests/suites/ java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/ java/testing...
Date Fri, 23 Nov 2007 22:19:18 GMT
Author: myrnavl
Date: Fri Nov 23 14:19:12 2007
New Revision: 597751

URL: http://svn.apache.org/viewvc?rev=597751&view=rev
Log:
DERBY-3211 - backport conversion of NSinSameJVM to junit NSinSameJVMTest (
  revisions 597456 and 597466). 

Added:
    db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/NSinSameJVMTest.java
      - copied unchanged from r597456, db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/NSinSameJVMTest.java
Removed:
    db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/master/NSinSameJVM.out
    db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/NSinSameJVM.java
    db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/NSinSameJVM.policy
    db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/NSinSameJVM_app.properties
    db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/NSinSameJVM_sed.properties
Modified:
    db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/suites/DerbyNetClientRemote.exclude
    db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/suites/DerbyNetClientUseprocess.exclude
    db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/suites/DerbyNetRemote.exclude
    db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/suites/DerbyNetUseprocess.exclude
    db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/suites/derbynetmats.runall
    db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/suites/j9derbynetmats.runall
    db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/_Suite.java
    db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/junit/TestConfiguration.java
    db/derby/code/branches/10.3/tools/release/build.xml

Modified: db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/suites/DerbyNetClientRemote.exclude
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/suites/DerbyNetClientRemote.exclude?rev=597751&r1=597750&r2=597751&view=diff
==============================================================================
--- db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/suites/DerbyNetClientRemote.exclude
(original)
+++ db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/suites/DerbyNetClientRemote.exclude
Fri Nov 23 14:19:12 2007
@@ -9,7 +9,6 @@
 #     the server machine
 # derbynet/getCurrentProperties for it exercises NetworkServerControl statements
 #     that are only supported on localhost
-# derbynet/NSinSameJVM - tries to start the server
 # derbynet/maxthreads - tries to use NetworkServerControl statements
 # derbynet/runtimeinfo - tries to use NetworkServerControl statements
 # derbynet/sysinfo - tries to use NetworkServerControl statements
@@ -26,7 +25,6 @@
 store/bootLock.java
 derbynet/dblook_test_net.java
 derbynet/getCurrentProperties.java
-derbynet/NSinSameJVM.java
 derbynet/maxthreads.java
 derbynet/runtimeinfo.java
 derbynet/sysinfo.java

Modified: db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/suites/DerbyNetClientUseprocess.exclude
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/suites/DerbyNetClientUseprocess.exclude?rev=597751&r1=597750&r2=597751&view=diff
==============================================================================
--- db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/suites/DerbyNetClientUseprocess.exclude
(original)
+++ db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/suites/DerbyNetClientUseprocess.exclude
Fri Nov 23 14:19:12 2007
@@ -7,7 +7,6 @@
 #     and access denied (java.lang.RuntimePermission loadLibrary.db2jcct2). (????!)
 # junitTests/derbyNet/CompatibilityTest.java - exits the suite
 # derbynet/DerbyNetAutoStart.java - exits the suite...
-# derbynet/NSinSameJVM.java - fails with different thread names. probably ok...
 # derbynet/dblook_test_net.java - expects different dir structure
 # stress/stress.multi - exits suite
 # derbynet/getCurrentProperties.java - fails, different sessions
@@ -27,7 +26,6 @@
 jdbcapi/bestrowidentifier.sql
 junitTests/derbyNet/CompatibilityTest.java
 derbynet/DerbyNetAutoStart.java
-derbynet/NSinSameJVM.java
 derbynet/dblook_test_net.java
 derbynet/getCurrentProperties.java
 derbynet/runtimeinfo.java

Modified: db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/suites/DerbyNetRemote.exclude
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/suites/DerbyNetRemote.exclude?rev=597751&r1=597750&r2=597751&view=diff
==============================================================================
--- db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/suites/DerbyNetRemote.exclude
(original)
+++ db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/suites/DerbyNetRemote.exclude
Fri Nov 23 14:19:12 2007
@@ -9,7 +9,6 @@
 #     the server machine
 # derbynet/getCurrentProperties for it exercises NetworkServerControl statements
 #     that are only supported on localhost
-# derbynet/NSinSameJVM - tries to start the server
 # derbynet/maxthreads - tries to use NetworkServerControl statements
 # derbynet/runtimeinfo - tries to use NetworkServerControl statements
 # derbynet/sysinfo - tries to use NetworkServerControl statements
@@ -25,7 +24,6 @@
 store/bootLock.java
 derbynet/dblook_test_net.java
 derbynet/getCurrentProperties.java
-derbynet/NSinSameJVM.java
 derbynet/maxthreads.java
 derbynet/runtimeinfo.java
 derbynet/sysinfo.java

Modified: db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/suites/DerbyNetUseprocess.exclude
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/suites/DerbyNetUseprocess.exclude?rev=597751&r1=597750&r2=597751&view=diff
==============================================================================
--- db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/suites/DerbyNetUseprocess.exclude
(original)
+++ db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/suites/DerbyNetUseprocess.exclude
Fri Nov 23 14:19:12 2007
@@ -6,7 +6,6 @@
 # jdbcapi/bestrowidentifier.sql - test fails when db2jcc is in classpath, complaining about
 #     java.lang.ExceptionInInitializerError 
 #     and access denied (java.lang.RuntimePermission loadLibrary.db2jcct2). (????!)
-# derbynet/NSinSameJVM.java - diff between thread and main. kind of ok, but fails.
 # derbynet/DerbyNetAutoStart.java - exits suite...
 # derbynet/getCurrentProperties.java - fails with different sessions
 # derbynet/dblook_test_net.java - fails, test misses properties
@@ -23,7 +22,6 @@
 jdbcapi/maxfieldsize.java
 jdbcapi/HoldabilityTest.junit
 jdbcapi/bestrowidentifier.sql
-derbynet/NSinSameJVM.java
 derbynet/DerbyNetAutoStart.java
 derbynet/getCurrentProperties.java
 derbynet/dblook_test_net.java

Modified: db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/suites/derbynetmats.runall
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/suites/derbynetmats.runall?rev=597751&r1=597750&r2=597751&view=diff
==============================================================================
--- db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/suites/derbynetmats.runall
(original)
+++ db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/suites/derbynetmats.runall
Fri Nov 23 14:19:12 2007
@@ -1,4 +1,3 @@
-derbynet/NSinSameJVM.java
 derbynet/dblook_test_net.java
 derbynet/DerbyNetAutoStart.java
 derbynet/getCurrentProperties.java

Modified: db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/suites/j9derbynetmats.runall
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/suites/j9derbynetmats.runall?rev=597751&r1=597750&r2=597751&view=diff
==============================================================================
--- db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/suites/j9derbynetmats.runall
(original)
+++ db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/suites/j9derbynetmats.runall
Fri Nov 23 14:19:12 2007
@@ -1,4 +1,3 @@
-derbynet/NSinSameJVM.java
 derbynet/dblook_test_net.java
 derbynet/getCurrentProperties.java
 derbynet/maxthreads.java

Modified: db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/_Suite.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/_Suite.java?rev=597751&r1=597750&r2=597751&view=diff
==============================================================================
--- db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/_Suite.java
(original)
+++ db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/_Suite.java
Fri Nov 23 14:19:12 2007
@@ -55,6 +55,7 @@
         suite.addTest(SecureServerTest.suite());
         suite.addTest(SSLTest.suite());
         suite.addTest(NetIjTest.suite());
+        suite.addTest(NSinSameJVMTest.suite());
         
         
         // Disabled due to "java.sql.SQLSyntaxErrorException: The class

Modified: db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/junit/TestConfiguration.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/junit/TestConfiguration.java?rev=597751&r1=597750&r2=597751&view=diff
==============================================================================
--- db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/junit/TestConfiguration.java
(original)
+++ db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/junit/TestConfiguration.java
Fri Nov 23 14:19:12 2007
@@ -290,6 +290,18 @@
                 suiteName(testClass)+":client");
         return clientServerDecorator(suite);
     }
+    /**
+     * Create a suite for the passed test class that includes
+     * all the default fixtures from the class, wrapped in
+     * a derbyClientServerDecorator with a given port.
+     * 
+     */
+    public static Test clientServerSuite(Class testClass, int port)
+    {           
+        TestSuite suite = new TestSuite(testClass,
+                suiteName(testClass)+":client");
+        return clientServerDecorator(suite,port);
+    }
 
     /**
      * Return a decorator for the passed in tests that sets the
@@ -309,6 +321,15 @@
             
         return defaultServerDecorator(test);
     }
+    /**
+     * Wrapper ot use the given port number.
+     */
+    public static Test clientServerDecorator(Test suite,int port)
+    {
+        Test test = new NetworkServerTestSetup(suite, false);
+            
+        return defaultServerDecorator(test,port);
+    }
    
     /**
      * Decorate a test to use suite's default host and port.
@@ -328,7 +349,24 @@
         //
         return new ServerSetup(test, DEFAULT_HOSTNAME, DEFAULT_PORT);
     }
-   
+    /**
+     * Decorate a test to use suite's default host and given port.
+     */
+    public static Test defaultServerDecorator(Test test, int port)
+    {
+        // Need to have network server and client and not
+        // running in J2ME (JSR169).
+        if (!(Derby.hasClient() && Derby.hasServer())
+                || JDBC.vmSupportsJSR169())
+            return new TestSuite("empty: no network server support");
+
+        //
+        // This looks bogus to me. Shouldn't this get the hostname and port
+        // which are specific to this test run (perhaps overridden on the
+        // command line)?
+        //
+        return new ServerSetup(test, DEFAULT_HOSTNAME, port);
+    }
 
     /**
      * Generate the unique database name for single use.

Modified: db/derby/code/branches/10.3/tools/release/build.xml
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.3/tools/release/build.xml?rev=597751&r1=597750&r2=597751&view=diff
==============================================================================
--- db/derby/code/branches/10.3/tools/release/build.xml (original)
+++ db/derby/code/branches/10.3/tools/release/build.xml Fri Nov 23 14:19:12 2007
@@ -418,9 +418,6 @@
   <target name="regex.masters">
     <property file="${basedir}/tools/release/maintversion.properties"/>
     <antcall target="regex.version"> 
-      <param name="regex.file" value="java/testing/org/apache/derbyTesting/functionTests/master/NSinSameJVM.out"/>
-    </antcall>
-    <antcall target="regex.version"> 
       <param name="regex.file" value="java/testing/org/apache/derbyTesting/functionTests/master/checkToursDB.out"/>
     </antcall>
     <antcall target="regex.version"> 



Mime
View raw message