Return-Path: X-Original-To: apmail-activemq-commits-archive@www.apache.org Delivered-To: apmail-activemq-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6D0AFCA25 for ; Thu, 31 May 2012 21:07:37 +0000 (UTC) Received: (qmail 21840 invoked by uid 500); 31 May 2012 21:07:37 -0000 Delivered-To: apmail-activemq-commits-archive@activemq.apache.org Received: (qmail 21807 invoked by uid 500); 31 May 2012 21:07:37 -0000 Mailing-List: contact commits-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list commits@activemq.apache.org Received: (qmail 21800 invoked by uid 99); 31 May 2012 21:07:37 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 31 May 2012 21:07:37 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 31 May 2012 21:07:35 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id C72B62388980 for ; Thu, 31 May 2012 21:07:15 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1344911 - /activemq/trunk/activemq-web-demo/src/test/java/org/apache/activemq/web/AjaxTest.java Date: Thu, 31 May 2012 21:07:15 -0000 To: commits@activemq.apache.org From: tabish@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120531210715.C72B62388980@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: tabish Date: Thu May 31 21:07:15 2012 New Revision: 1344911 URL: http://svn.apache.org/viewvc?rev=1344911&view=rev Log: apply fix for: https://issues.apache.org/jira/browse/AMQ-3865 Modified: activemq/trunk/activemq-web-demo/src/test/java/org/apache/activemq/web/AjaxTest.java Modified: activemq/trunk/activemq-web-demo/src/test/java/org/apache/activemq/web/AjaxTest.java URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-web-demo/src/test/java/org/apache/activemq/web/AjaxTest.java?rev=1344911&r1=1344910&r2=1344911&view=diff ============================================================================== --- activemq/trunk/activemq-web-demo/src/test/java/org/apache/activemq/web/AjaxTest.java (original) +++ activemq/trunk/activemq-web-demo/src/test/java/org/apache/activemq/web/AjaxTest.java Thu May 31 21:07:15 2012 @@ -125,10 +125,10 @@ public class AjaxTest extends JettyTestS String fullResponse = response + poll.getResponseContent(); LOG.debug( "full response : " + fullResponse ); + assertContains( "msg1", fullResponse ); + assertContains( "msg2", fullResponse ); + assertContains( "msg3", fullResponse ); - assertContains( "msg1\n", fullResponse ); - assertContains( "msg2\n", fullResponse ); - assertContains( "msg3\n", fullResponse ); assertResponseCount( 3, fullResponse ); } @@ -188,9 +188,9 @@ public class AjaxTest extends JettyTestS String fullResponse = response + poll.getResponseContent(); LOG.debug( "full response : " + fullResponse ); - assertContains( "msg1\n", fullResponse ); - assertContains( "msg2\n", fullResponse ); - assertContains( "msg3\n", fullResponse ); + assertContains( "msg1", fullResponse ); + assertContains( "msg2", fullResponse ); + assertContains( "msg3", fullResponse ); assertResponseCount( 3, fullResponse ); } @@ -228,9 +228,9 @@ public class AjaxTest extends JettyTestS poll.waitForDone(); String response = poll.getResponseContent(); - assertContains( "test one\n", response ); - assertContains( "test two\n", response ); - assertContains( "test three\n", response ); + assertContains( "test one", response ); + assertContains( "test two", response ); + assertContains( "test three", response ); assertResponseCount( 3, response ); } @@ -294,11 +294,11 @@ public class AjaxTest extends JettyTestS String fullResponse = response + poll.getResponseContent(); - assertContains( "message1\n", fullResponse ); - assertContains( "message2\n", fullResponse ); - assertContains( "message3\n", fullResponse ); - assertContains( "message4\n", fullResponse ); - assertContains( "message5\n", fullResponse ); + assertContains( "message1", fullResponse ); + assertContains( "message2", fullResponse ); + assertContains( "message3", fullResponse ); + assertContains( "message4", fullResponse ); + assertContains( "message5", fullResponse ); assertResponseCount( 5, fullResponse ); } @@ -382,10 +382,9 @@ public class AjaxTest extends JettyTestS LOG.debug( poll.getResponseContent() ); - String expected = "\n" + - "test two\n" + - "\n"; - assertEquals( "Poll response is not correct.", expected, poll.getResponseContent() ); + String expected = "test two"; + + assertContains( expected, poll.getResponseContent() ); } @@ -444,11 +443,11 @@ public class AjaxTest extends JettyTestS poll.waitForDone(); LOG.debug( "clientA response : " + poll.getResponseContent() ); - String expected = "\n" + - "A1\n" + - "A2\n" + - "\n"; - assertEquals( "Poll response is not correct.", expected, poll.getResponseContent() ); + String expected1 = "A1"; + String expected2 = "A2"; + + assertContains( expected1, poll.getResponseContent() ); + assertContains( expected2, poll.getResponseContent() ); // clientB polls for messages poll = new AjaxTestContentExchange(); @@ -459,11 +458,11 @@ public class AjaxTest extends JettyTestS poll.waitForDone(); LOG.debug( "clientB response : " + poll.getResponseContent() ); - expected = "\n" + - "B1\n" + - "B2\n" + - "\n"; - assertEquals( "Poll response is not correct.", expected, poll.getResponseContent() ); + expected1 = "B1"; + expected2 = "B2"; + + assertContains( expected1, poll.getResponseContent() ); + assertContains( expected2, poll.getResponseContent() ); } public void testAjaxClientReceivesMessagesForMultipleTopics() throws Exception { @@ -530,10 +529,10 @@ public class AjaxTest extends JettyTestS String fullResponse = response + poll.getResponseContent(); LOG.debug( "full response " + fullResponse ); - assertContains( "A1\n", fullResponse ); - assertContains( "B1\n", fullResponse ); - assertContains( "A2\n", fullResponse ); - assertContains( "B2\n", fullResponse ); + assertContains( "A1", fullResponse ); + assertContains( "B1", fullResponse ); + assertContains( "A2", fullResponse ); + assertContains( "B2", fullResponse ); assertResponseCount( 4, fullResponse ); } }