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 2008/04/28 03:03:31 UTC
svn commit: r652036 -
/incubator/tuscany/java/sca/modules/host-jetty/src/test/java/org/apache/tuscany/sca/http/jetty/JettyServerTestCase.java
Author: jsdelfino
Date: Sun Apr 27 18:03:27 2008
New Revision: 652036
URL: http://svn.apache.org/viewvc?rev=652036&view=rev
Log:
Adjusted test condition in removeServletMapping test case now that the server releases the port when there's no servlet mappings anymore.
Modified:
incubator/tuscany/java/sca/modules/host-jetty/src/test/java/org/apache/tuscany/sca/http/jetty/JettyServerTestCase.java
Modified: incubator/tuscany/java/sca/modules/host-jetty/src/test/java/org/apache/tuscany/sca/http/jetty/JettyServerTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/host-jetty/src/test/java/org/apache/tuscany/sca/http/jetty/JettyServerTestCase.java?rev=652036&r1=652035&r2=652036&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/host-jetty/src/test/java/org/apache/tuscany/sca/http/jetty/JettyServerTestCase.java (original)
+++ incubator/tuscany/java/sca/modules/host-jetty/src/test/java/org/apache/tuscany/sca/http/jetty/JettyServerTestCase.java Sun Apr 27 18:03:27 2008
@@ -128,11 +128,15 @@
String uri = "http://127.0.0.1:" + HTTP_PORT + "/foo";
service.addServletMapping(uri, servlet);
service.removeServletMapping(uri);
- Socket client = new Socket("127.0.0.1", HTTP_PORT);
- OutputStream os = client.getOutputStream();
- os.write(REQUEST1.getBytes());
- os.flush();
- read(client);
+ try {
+ Socket client = new Socket("127.0.0.1", HTTP_PORT);
+ OutputStream os = client.getOutputStream();
+ os.write(REQUEST1.getBytes());
+ os.flush();
+ read(client);
+ fail("Server still bound to port");
+ } catch (ConnectException e) {
+ }
service.stop();
assertFalse(servlet.invoked);
}