From 391b0ee4267eafa5897ea06d92b0c4ddbd56080c Mon Sep 17 00:00:00 2001 From: Thomas Becker Date: Thu, 13 Jun 2013 17:36:29 +0200 Subject: [PATCH] ChatServletTest fix test --- .../src/main/resources/jetty-logging.properties | 2 +- .../src/test/java/org/eclipse/jetty/ChatServletTest.java | 7 ++++--- 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 7d9b55efd45..d474e353479 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 abc991e7930..eb8717f1950 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