aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Becker2013-06-13 11:36:29 (EDT)
committerThomas Becker2013-06-13 11:36:29 (EDT)
commit391b0ee4267eafa5897ea06d92b0c4ddbd56080c (patch)
tree8b0cb5ff86a7cd3d058cd93cc901d02996119483
parentdf17ef8b3a01c208ff94cb1333b4ad573b77c307 (diff)
downloadorg.eclipse.jetty.project-391b0ee4267eafa5897ea06d92b0c4ddbd56080c.zip
org.eclipse.jetty.project-391b0ee4267eafa5897ea06d92b0c4ddbd56080c.tar.gz
org.eclipse.jetty.project-391b0ee4267eafa5897ea06d92b0c4ddbd56080c.tar.bz2
ChatServletTest fix test
-rw-r--r--tests/test-webapps/test-jetty-webapp/src/main/resources/jetty-logging.properties2
-rw-r--r--tests/test-webapps/test-jetty-webapp/src/test/java/org/eclipse/jetty/ChatServletTest.java7
2 files changed, 5 insertions, 4 deletions
diff --git a/tests/test-webapps/test-jetty-webapp/src/main/resources/jetty-logging.properties b/tests/test-webapps/test-jetty-webapp/src/main/resources/jetty-logging.properties
index 7d9b55e..d474e35 100644
--- a/tests/test-webapps/test-jetty-webapp/src/main/resources/jetty-logging.properties
+++ b/tests/test-webapps/test-jetty-webapp/src/main/resources/jetty-logging.properties
@@ -1,2 +1,2 @@
org.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.StdErrLog
-com.acme.LEVEL=DEBUG
+com.acme.LEVEL=INFO
diff --git a/tests/test-webapps/test-jetty-webapp/src/test/java/org/eclipse/jetty/ChatServletTest.java b/tests/test-webapps/test-jetty-webapp/src/test/java/org/eclipse/jetty/ChatServletTest.java
index abc991e..eb8717f 100644
--- a/tests/test-webapps/test-jetty-webapp/src/test/java/org/eclipse/jetty/ChatServletTest.java
+++ b/tests/test-webapps/test-jetty-webapp/src/test/java/org/eclipse/jetty/ChatServletTest.java
@@ -42,7 +42,7 @@ public class ChatServletTest
tester.setContextPath("/");
ServletHolder dispatch = tester.addServlet(ChatServlet.class, "/chat/*");
- dispatch.setInitParameter("asyncTimeout","500");
+ dispatch.setInitParameter("asyncTimeout", "500");
tester.start();
}
@@ -61,8 +61,9 @@ public class ChatServletTest
@Test
public void testChat() throws Exception
{
- assertResponse("user=test&message=has%20joined!", "{\"from\":\"test\",\"chat\":\"has joined!\"}");
- assertResponse("user=test&message=message", "");
+ assertResponse("user=test&join=true&message=has%20joined!", "{\"from\":\"test\",\"chat\":\"has joined!\"}");
+ String response = tester.getResponses(createRequestString("user=test&message=message"));
+ assertThat(response.contains("{"), is(false)); // make sure we didn't get a json body
}
@Test