db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r510593 - in /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet: NetHarnessJavaTest.java SecureServerTest.java
Date Thu, 22 Feb 2007 17:17:27 GMT
Author: djd
Date: Thu Feb 22 09:17:27 2007
New Revision: 510593

URL: http://svn.apache.org/viewvc?view=rev&rev=510593
Log:
DERBY-2366 Add checks to ensure SecureServerTest is run only when the server code is in the
classpath
and NetHarnessJavaTest works correctly in J2ME. 

Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/NetHarnessJavaTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/SecureServerTest.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/NetHarnessJavaTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/NetHarnessJavaTest.java?view=diff&rev=510593&r1=510592&r2=510593
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/NetHarnessJavaTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/NetHarnessJavaTest.java
Thu Feb 22 09:17:27 2007
@@ -25,6 +25,7 @@
 
 import org.apache.derbyTesting.functionTests.util.HarnessJavaTest;
 import org.apache.derbyTesting.junit.Derby;
+import org.apache.derbyTesting.junit.JDBC;
 import org.apache.derbyTesting.junit.TestConfiguration;
 import org.apache.derbyTesting.junit.SecurityManagerSetup;
 import org.apache.derbyTesting.junit.SupportFilesSetup;
@@ -81,8 +82,11 @@
         		         SecurityManagerSetup.noSecurityManager(
         		             decorate(new NetHarnessJavaTest("testProtocol")))));
 
-        suite.addTest(SecurityManagerSetup.noSecurityManager(
+        // Server does not run on J2ME
+        if (JDBC.vmSupportsJDBC3()) {
+            suite.addTest(SecurityManagerSetup.noSecurityManager(
         		         decorate(new NetHarnessJavaTest("DerbyNetNewServer"))));
+        }
         
         return new SupportFilesSetup(suite,
         	           new String[] {

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/SecureServerTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/SecureServerTest.java?view=diff&rev=510593&r1=510592&r2=510593
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/SecureServerTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/SecureServerTest.java
Thu Feb 22 09:17:27 2007
@@ -32,6 +32,7 @@
 import junit.framework.Test;
 import junit.framework.TestSuite;
 import org.apache.derbyTesting.junit.BaseTestCase;
+import org.apache.derbyTesting.junit.Derby;
 import org.apache.derbyTesting.junit.NetworkServerTestSetup;
 import org.apache.derbyTesting.junit.SecurityManagerSetup;
 import org.apache.derbyTesting.junit.ServerSetup;
@@ -146,10 +147,14 @@
     {
         //NetworkServerTestSetup.setWaitTime( 10000L );
         
-        TestSuite       suite = new TestSuite();
+        TestSuite       suite = new TestSuite("SecureServerTest");
 
         // Server booting requires that we run from the jar files
         if ( !TestConfiguration.loadingFromJars() ) { return suite; }
+        
+        // Need derbynet.jar in the classpath!
+        if (!Derby.hasServer())
+            return suite;
 
         // O = Overriden
         // A = Authenticated



Mime
View raw message