Author: ron.sigal(a)jboss.com
Date: 2009-09-01 21:03:30 -0400 (Tue, 01 Sep 2009)
New Revision: 5425
Modified:
remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/http/contenttype/ContentTypeTestCase.java
Log:
JBREM-1101: Minor changes to implement the servlet version.
Modified:
remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/http/contenttype/ContentTypeTestCase.java
===================================================================
---
remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/http/contenttype/ContentTypeTestCase.java 2009-09-02
01:02:41 UTC (rev 5424)
+++
remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/http/contenttype/ContentTypeTestCase.java 2009-09-02
01:03:30 UTC (rev 5425)
@@ -60,14 +60,14 @@
*/
public class ContentTypeTestCase extends TestCase
{
+ public static String CONTENT_TYPE = "test/testContentType";
+ public static String INVALID_CONTENT_TYPE_CR = "test/x" + '\r' +
"y";
+ public static String INVALID_CONTENT_TYPE_LF = "test/x" + '\n' +
"y";
+ public static String REQUEST = "testRequest";
+ public static String RESPONSE = "testResponse";
+
private static Logger log = Logger.getLogger(ContentTypeTestCase.class);
-
private static boolean firstTime = true;
- private static String CONTENT_TYPE = "test/testContentType";
- private static String INVALID_CONTENT_TYPE_CR = "test/x" + '\r' +
"y";
- private static String INVALID_CONTENT_TYPE_LF = "test/x" + '\n' +
"y";
- private static String REQUEST = "testRequest";
- private static String RESPONSE = "testResponse";
protected String host;
protected int port;
@@ -126,7 +126,7 @@
assertEquals(CONTENT_TYPE, contentType);
assertEquals(RESPONSE, response);
- connector.stop();
+ teardownServer();
log.info(getName() + " PASSES");
}
@@ -161,7 +161,7 @@
assertEquals(WebUtil.HTML, contentType);
assertEquals(RESPONSE, response);
- connector.stop();
+ teardownServer();
log.info(getName() + " PASSES");
}
@@ -196,7 +196,7 @@
assertEquals(WebUtil.HTML, contentType);
assertEquals(RESPONSE, response);
- connector.stop();
+ teardownServer();
log.info(getName() + " PASSES");
}
@@ -234,6 +234,15 @@
}
+ protected void teardownServer()
+ {
+ if (connector != null)
+ {
+ connector.stop();
+ }
+ }
+
+
static class TestInvocationHandler implements ServerInvocationHandler
{
String contentType;
Show replies by date