db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mi...@apache.org
Subject svn commit: r786096 - in /db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting: functionTests/master/ functionTests/suites/ functionTests/tests/derbynet/ junit/
Date Thu, 18 Jun 2009 14:54:36 GMT
Author: mikem
Date: Thu Jun 18 14:54:36 2009
New Revision: 786096

URL: http://svn.apache.org/viewvc?rev=786096&view=rev
Log:
DERBY-3717; convert derbynet/getCurrentProperties to junit
Patch contributed by Manjula Kutty

backporting fix (svn #685946) from trunk to 10.3 branch. 


Added:
    db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/GetCurrentPropertiesTest.java
      - copied unchanged from r685946, db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/GetCurrentPropertiesTest.java
    db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/GetCurrentPropertiesTest.policy
      - copied unchanged from r685946, db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/GetCurrentPropertiesTest.policy
Removed:
    db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/master/getCurrentProperties.out
    db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/getCurrentProperties.java
    db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/getCurrentProperties.policy
    db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/getCurrentProperties_app.properties
    db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/getCurrentProperties_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/BaseTestCase.java

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=786096&r1=786095&r2=786096&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
Thu Jun 18 14:54:36 2009
@@ -9,8 +9,6 @@
 #     the server machine
 # derbynet/dblook_test_net_territory because it tries to search derby.log, which is on
 #     the server machine
-# derbynet/getCurrentProperties for it exercises NetworkServerControl statements
-#     that are only supported on localhost
 # derbynet/maxthreads - tries to use NetworkServerControl statements
 # derbynet/runtimeinfo - tries to use NetworkServerControl statements
 # derbynet/sysinfo - tries to use NetworkServerControl statements
@@ -27,7 +25,6 @@
 store/bootLock.java
 derbynet/dblook_test_net.java
 derbynet/dblook_test_net_territory.java
-derbynet/getCurrentProperties.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=786096&r1=786095&r2=786096&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
Thu Jun 18 14:54:36 2009
@@ -10,7 +10,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/getCurrentProperties.java - fails, different sessions
 # derbynet/runtimeinfo.java - different sessions
 # derbynet/sysinfo.java - needs other properties
 # derbynet/sysinfo_withproperties.java - needs other properties
@@ -29,7 +28,6 @@
 derbynet/DerbyNetAutoStart.java
 derbynet/dblook_test_net.java
 derbynet/dblook_test_net_territory.java
-derbynet/getCurrentProperties.java
 derbynet/runtimeinfo.java
 derbynet/sysinfo.java
 derbynet/sysinfo_withproperties.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=786096&r1=786095&r2=786096&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
Thu Jun 18 14:54:36 2009
@@ -9,8 +9,6 @@
 #     the server machine
 # derbynet/dblook_test_net_territory because it tries to search derby.log, which is on
 #     the server machine
-# derbynet/getCurrentProperties for it exercises NetworkServerControl statements
-#     that are only supported on localhost
 # derbynet/maxthreads - tries to use NetworkServerControl statements
 # derbynet/runtimeinfo - tries to use NetworkServerControl statements
 # derbynet/sysinfo - tries to use NetworkServerControl statements
@@ -26,7 +24,6 @@
 store/bootLock.java
 derbynet/dblook_test_net.java
 derbynet/dblook_test_net_territory.java
-derbynet/getCurrentProperties.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=786096&r1=786095&r2=786096&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
Thu Jun 18 14:54:36 2009
@@ -7,7 +7,6 @@
 #     java.lang.ExceptionInInitializerError 
 #     and access denied (java.lang.RuntimePermission loadLibrary.db2jcct2). (????!)
 # derbynet/DerbyNetAutoStart.java - exits suite...
-# derbynet/getCurrentProperties.java - fails with different sessions
 # 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)
@@ -24,7 +23,6 @@
 jdbcapi/HoldabilityTest.junit
 jdbcapi/bestrowidentifier.sql
 derbynet/DerbyNetAutoStart.java
-derbynet/getCurrentProperties.java
 derbynet/dblook_test_net.java
 derbynet/dblook_test_net_territory.java
 derbynet/runtimeinfo.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=786096&r1=786095&r2=786096&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
Thu Jun 18 14:54:36 2009
@@ -1,7 +1,6 @@
 derbynet/dblook_test_net.java
 derbynet/dblook_test_net_territory.java
 derbynet/DerbyNetAutoStart.java
-derbynet/getCurrentProperties.java
 derbynet/maxthreads.java
 derbynet/runtimeinfo.java
 derbynet/sysinfo.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=786096&r1=786095&r2=786096&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
Thu Jun 18 14:54:36 2009
@@ -1,6 +1,5 @@
 derbynet/dblook_test_net.java
 derbynet/dblook_test_net_territory.java
-derbynet/getCurrentProperties.java
 derbynet/maxthreads.java
 derbynet/runtimeinfo.java
 derbynet/testProperties.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=786096&r1=786095&r2=786096&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
Thu Jun 18 14:54:36 2009
@@ -57,7 +57,9 @@
         suite.addTest(NetIjTest.suite());
         suite.addTest(LOBLocatorReleaseTest.suite());
         suite.addTest(NSinSameJVMTest.suite());
-        
+        suite.addTest(GetCurrentPropertiesTest.suite());
+
+
         // Disabled due to "java.sql.SQLSyntaxErrorException: The class
         // 'org.apache.derbyTesting.functionTests.tests.derbynet.checkSecMgr'
         //  does not exist or is inaccessible. This can happen if the class is not public."

Modified: db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/junit/BaseTestCase.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/junit/BaseTestCase.java?rev=786096&r1=786095&r2=786096&view=diff
==============================================================================
--- db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/junit/BaseTestCase.java
(original)
+++ db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/junit/BaseTestCase.java
Thu Jun 18 14:54:36 2009
@@ -20,6 +20,7 @@
 package org.apache.derbyTesting.junit;
 
 import junit.framework.TestCase;
+import junit.framework.AssertionFailedError;
 
 import java.io.BufferedInputStream;
 import java.io.File;
@@ -394,4 +395,21 @@
     {
         DropDatabaseSetup.removeDirectory(dir);
     }
+
+    /**
+     * Fail; attaching an exception for more detail on cause.
+     *
+     * @param msg message explaining the failure
+     * @param e exception related to the cause
+     *
+     * @exception AssertionFailedError
+     */
+    public static void fail(String msg, Exception e)
+            throws AssertionFailedError {
+
+        AssertionFailedError ae = new AssertionFailedError(msg);
+        ae.initCause(e);
+        throw ae;
+    }
+
 } // End class BaseTestCase



Mime
View raw message