You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by js...@apache.org on 2007/04/07 04:02:40 UTC
svn commit: r526345 -
/incubator/tuscany/java/sca/modules/http-tomcat/src/test/java/org/apache/tuscany/http/tomcat/TomcatServerTestCase.java
Author: jsdelfino
Date: Fri Apr 6 19:02:39 2007
New Revision: 526345
URL: http://svn.apache.org/viewvc?view=rev&rev=526345
Log:
Fixed intermittent test case failure, we need to actually send something to the TCP/IP socket to detect that the server is not listening.
Modified:
incubator/tuscany/java/sca/modules/http-tomcat/src/test/java/org/apache/tuscany/http/tomcat/TomcatServerTestCase.java
Modified: incubator/tuscany/java/sca/modules/http-tomcat/src/test/java/org/apache/tuscany/http/tomcat/TomcatServerTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/http-tomcat/src/test/java/org/apache/tuscany/http/tomcat/TomcatServerTestCase.java?view=diff&rev=526345&r1=526344&r2=526345
==============================================================================
--- incubator/tuscany/java/sca/modules/http-tomcat/src/test/java/org/apache/tuscany/http/tomcat/TomcatServerTestCase.java (original)
+++ incubator/tuscany/java/sca/modules/http-tomcat/src/test/java/org/apache/tuscany/http/tomcat/TomcatServerTestCase.java Fri Apr 6 19:02:39 2007
@@ -22,7 +22,6 @@
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStream;
-import java.net.ConnectException;
import java.net.Socket;
import javax.servlet.ServletException;
@@ -30,8 +29,6 @@
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import org.apache.tuscany.http.tomcat.TomcatServer;
-
import junit.framework.TestCase;
/**
@@ -117,8 +114,11 @@
service.init();
Exception ex = null;
try {
- new Socket("127.0.0.1", HTTP_PORT);
- } catch (ConnectException e) {
+ Socket client = new Socket("127.0.0.1", HTTP_PORT);
+ OutputStream os = client.getOutputStream();
+ os.write(REQUEST1.getBytes());
+ os.flush();
+ } catch (Exception e) {
ex = e;
}
assertNotNull(ex);
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org