You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ch...@apache.org on 2007/08/28 22:05:09 UTC
svn commit: r570556 -
/activemq/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailRouteTest.java
Author: chirino
Date: Tue Aug 28 13:05:08 2007
New Revision: 570556
URL: http://svn.apache.org/viewvc?rev=570556&view=rev
Log:
use unique mailbox names to avoid clashes with outher tests (was causing this to fail on windows)
Modified:
activemq/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailRouteTest.java
Modified: activemq/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailRouteTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailRouteTest.java?rev=570556&r1=570555&r2=570556&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailRouteTest.java (original)
+++ activemq/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailRouteTest.java Tue Aug 28 13:05:08 2007
@@ -43,11 +43,11 @@
resultEndpoint.expectedBodiesReceived("hello world!");
HashMap<String, Object> headers = new HashMap<String, Object>();
- headers.put("reply-to", "reply1@localhost");
- template.sendBodyAndHeaders("smtp://james@localhost", "hello world!", headers);
+ headers.put("reply-to", "route-test-reply@localhost");
+ template.sendBodyAndHeaders("smtp://route-test-james@localhost", "hello world!", headers);
// lets test the first sent worked
- assertMailboxReceivedMessages("james@localhost");
+ assertMailboxReceivedMessages("route-test-james@localhost");
// lets sleep to check that the mail poll does not redeliver duplicate
// mails
@@ -59,9 +59,9 @@
// Validate that the headers were preserved.
Exchange exchange = resultEndpoint.getReceivedExchanges().get(0);
String replyTo = (String)exchange.getIn().getHeader("reply-to");
- assertEquals("reply1@localhost", replyTo);
+ assertEquals("route-test-reply@localhost", replyTo);
- assertMailboxReceivedMessages("copy@localhost");
+ assertMailboxReceivedMessages("route-test-copy@localhost");
}
protected void assertMailboxReceivedMessages(String name) throws IOException, MessagingException {
@@ -77,9 +77,9 @@
protected RouteBuilder createRouteBuilder() {
return new RouteBuilder() {
public void configure() {
- from("smtp://james@localhost").to("direct:a");
- from("direct:a").to("smtp://result@localhost", "smtp://copy@localhost");
- from("smtp://result@localhost").convertBodyTo(String.class).to("mock:result");
+ from("smtp://route-test-james@localhost").to("direct:a");
+ from("direct:a").to("smtp://route-test-result@localhost", "smtp://route-test-copy@localhost");
+ from("smtp://route-test-result@localhost").convertBodyTo(String.class).to("mock:result");
}
};
}