db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kahat...@apache.org
Subject svn commit: r1496406 - /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/LoginTimeoutTest.java
Date Tue, 25 Jun 2013 10:53:52 GMT
Author: kahatlen
Date: Tue Jun 25 10:53:52 2013
New Revision: 1496406

URL: http://svn.apache.org/r1496406
Log:
DERBY-6272: LoginTimeoutTest fails if server is missing

Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/LoginTimeoutTest.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/LoginTimeoutTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/LoginTimeoutTest.java?rev=1496406&r1=1496405&r2=1496406&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/LoginTimeoutTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/LoginTimeoutTest.java
Tue Jun 25 10:53:52 2013
@@ -38,7 +38,7 @@ import org.apache.derby.authentication.U
 
 import org.apache.derbyTesting.junit.BaseTestCase;
 import org.apache.derbyTesting.junit.BaseJDBCTestCase;
-import org.apache.derbyTesting.junit.CleanDatabaseTestSetup;
+import org.apache.derbyTesting.junit.Derby;
 import org.apache.derbyTesting.junit.SystemPropertyTestSetup;
 import org.apache.derbyTesting.junit.J2EEDataSource;
 import org.apache.derbyTesting.junit.JDBCClient;
@@ -219,12 +219,18 @@ public class LoginTimeoutTest extends Ba
         embedded = TestConfiguration.singleUseDatabaseDecorator( embedded );
         embedded = new SystemPropertyTestSetup( embedded, systemProperties() );
         suite.addTest( embedded );
-        
-        Test    clientServer = new TestSuite( LoginTimeoutTest.class, "client/server LoginTimeoutTest"
);
-        clientServer = TestConfiguration.singleUseDatabaseDecorator( clientServer );
-        clientServer = new JDBCClientSetup( clientServer, JDBCClient.DERBYNETCLIENT );
-        clientServer = new NetworkServerTestSetup( clientServer, systemPropertiesArray(),
new String[]{}, true );
-        suite.addTest( clientServer );
+
+        if (Derby.hasServer() && Derby.hasClient()) {
+            Test clientServer = new TestSuite(
+                    LoginTimeoutTest.class, "client/server LoginTimeoutTest");
+            clientServer =
+                    TestConfiguration.singleUseDatabaseDecorator(clientServer);
+            clientServer = new JDBCClientSetup(
+                    clientServer, JDBCClient.DERBYNETCLIENT);
+            clientServer = new NetworkServerTestSetup(clientServer,
+                    systemPropertiesArray(), new String[]{}, true);
+            suite.addTest(clientServer);
+        }
 
         return suite;
     }



Mime
View raw message