db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r532498 - /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/DerbyNetNewServer.java
Date Wed, 25 Apr 2007 21:57:11 GMT
Author: dag
Date: Wed Apr 25 14:57:10 2007
New Revision: 532498

URL: http://svn.apache.org/viewvc?view=rev&rev=532498
Log:
DERBY-2440 DerbyNetNewServer should specify port when it starts a server to avoid requiring
1527 to run
Committed patch d2440.diff.

Contributed by Julius Stroffek (julius.stroffek@sun.com).

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

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/DerbyNetNewServer.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/DerbyNetNewServer.java?view=diff&rev=532498&r1=532497&r2=532498
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/DerbyNetNewServer.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/DerbyNetNewServer.java
Wed Apr 25 14:57:10 2007
@@ -24,6 +24,8 @@
 import org.apache.derby.drda.NetworkServerControl;
 
 import org.apache.derbyTesting.functionTests.harness.jvm;
+import org.apache.derbyTesting.junit.TestConfiguration;
+
 import org.apache.derby.tools.ij;
 
 import java.util.Properties;
@@ -32,6 +34,8 @@
 import java.io.OutputStream;
 import java.io.PrintWriter;
 
+import java.net.InetAddress;
+
 import java.sql.DriverManager;
 import java.sql.Connection;
 import java.sql.DatabaseMetaData;
@@ -76,8 +80,15 @@
 
             ByteArrayOutputStream bos = new ByteArrayOutputStream();
 
-            testServer(new NetworkServerControl(), bos, "non-null PrintWriter");
-            testServer(new NetworkServerControl(), null, "null PrintWriter");
+            NetworkServerControl server = new NetworkServerControl(
+                InetAddress.getByName("localhost"),
+                TestConfiguration.getCurrent().getPort());
+            testServer(server, bos, "non-null PrintWriter");
+
+            server = new NetworkServerControl(
+                InetAddress.getByName("localhost"),
+                TestConfiguration.getCurrent().getPort());
+            testServer(server, null, "null PrintWriter");
         }
         catch( Exception e)
         {



Mime
View raw message