User: jung
Date: 00/09/04 06:02:14
Modified: src/org/zoap/soap/test Soap.java
Log:
each test run now creates its http-server on a fresh port
such that the address_in_use errors under linux disappear.
Revision Changes Path
1.2 +18 -13 zoap/src/org/zoap/soap/test/Soap.java
Index: Soap.java
===================================================================
RCS file: /products/cvs/ejboss/zoap/src/org/zoap/soap/test/Soap.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Soap.java 2000/08/10 21:07:24 1.1
+++ Soap.java 2000/09/04 13:02:13 1.2
@@ -1,5 +1,5 @@
/*
- * $Id: Soap.java,v 1.1 2000/08/10 21:07:24 jung Exp $
+ * $Id: Soap.java,v 1.2 2000/09/04 13:02:13 jung Exp $
* Copyright 2000 (C) infor:business solutions AG, Hauerstrasse 12,
* D-66299 Friedrichsthal, Germany. All Rights Reserved.
*
@@ -104,7 +104,7 @@
* A unit test for checking low-level features of the soap service
* @see <related>
* @author $Author: jung $
- * @version $Revision: 1.1 $
+ * @version $Revision: 1.2 $
*/
public class Soap extends junit.framework.TestCase {
@@ -131,11 +131,12 @@
}
HttpServer server;
+ static int currentPort=4241;
public void setUp() {
try {
- server = new HttpServer(4242);
+ server = new HttpServer(++currentPort);
server.start();
} catch (Exception e) {
e.printStackTrace();
@@ -145,7 +146,7 @@
public void testSoapHttpServer() throws java.io.IOException, HttpException,
SoapException {
- java.net.URL proxyUrl = new java.net.URL("http://localhost:4242/");
+ java.net.URL proxyUrl = new
java.net.URL("http://localhost:"+currentPort+"/");
java.net.URL targetUrl = new java.net.URL(proxyUrl, "");
@@ -167,7 +168,7 @@
SoapTie serviceInterceptor = new SoapTie(server, service);
- java.net.URL proxyUrl = new java.net.URL("http://localhost:4242/");
+ java.net.URL proxyUrl = new
java.net.URL("http://localhost:"+currentPort+"/");
java.net.URL targetUrl = new java.net.URL(proxyUrl,
serviceInterceptor.getHandle());
@@ -188,7 +189,7 @@
SoapTie serviceInterceptor = new SoapTie(server, service, new
DefaultBinding());
- java.net.URL proxyUrl = new java.net.URL("http://localhost:4242/");
+ java.net.URL proxyUrl = new
java.net.URL("http://localhost:"+currentPort+"/");
java.net.URL targetUrl = new java.net.URL(proxyUrl,
serviceInterceptor.getHandle());
@@ -315,7 +316,7 @@
SoapTie serviceInterceptor = new SoapTie(server, service, new
DefaultBinding());
- java.net.URL proxyUrl = new java.net.URL("http://localhost:4242/");
+ java.net.URL proxyUrl = new
java.net.URL("http://localhost:"+currentPort+"/");
java.net.URL targetUrl = new java.net.URL(proxyUrl,
serviceInterceptor.getHandle());
@@ -341,7 +342,7 @@
SoapTie serviceInterceptor = new SoapTie(server, service, new
DefaultBinding());
- java.net.URL proxyUrl = new java.net.URL("http://localhost:4242/");
+ java.net.URL proxyUrl = new
java.net.URL("http://localhost:"+currentPort+"/");
java.net.URL targetUrl = new java.net.URL(proxyUrl,
serviceInterceptor.getHandle());
@@ -771,7 +772,7 @@
SoapTie serviceInterceptor = new SoapTie(server, service, binding);
- java.net.URL proxyUrl = new java.net.URL("http://localhost:4242/");
+ java.net.URL proxyUrl = new
java.net.URL("http://localhost:"+currentPort+"/");
java.net.URL targetUrl = new java.net.URL(proxyUrl,
serviceInterceptor.getHandle());
@@ -893,17 +894,22 @@
server.stop();
- try {
+ /*try {
Thread.sleep(1000);
} catch (InterruptedException e) {
- }
+ }*/
}
-} // DataAccess
+} // Soap
-/** $Log: Soap.java,v $
-/** Revision 1.1 2000/08/10 21:07:24 jung
-/** Initial revision
-/** */
+/**
+ * $Log: Soap.java,v $
+ * Revision 1.2 2000/09/04 13:02:13 jung
+ * each test run now creates its http-server on a fresh port
+ * such that the address_in_use errors under linux disappear.
+ *
+ * Revision 1.1.1.1 2000/08/10 21:07:24 jung
+ * Initial import.
+ */