db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From myrn...@apache.org
Subject svn commit: r1462677 - /db/derby/code/branches/10.9/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/DerbyNetAutoStartTest.java
Date Sat, 30 Mar 2013 00:02:54 GMT
Author: myrnavl
Date: Sat Mar 30 00:02:54 2013
New Revision: 1462677

URL: http://svn.apache.org/r1462677
Log:
DERBY-3838; Convert derbynet/DerbyNetAutoStart to JUnit
  ensure the test gets skipped with j2ME/JSR169.

Modified:
    db/derby/code/branches/10.9/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/DerbyNetAutoStartTest.java

Modified: 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.9/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/DerbyNetAutoStartTest.java?rev=1462677&r1=1462676&r2=1462677&view=diff
==============================================================================
--- db/derby/code/branches/10.9/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/DerbyNetAutoStartTest.java
(original)
+++ db/derby/code/branches/10.9/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/DerbyNetAutoStartTest.java
Sat Mar 30 00:02:54 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 )



Mime
View raw message