camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r1061136 - in /camel/trunk/components: camel-mail/src/test/java/org/apache/camel/component/mail/ camel-nagios/src/test/java/org/apache/camel/component/nagios/
Date Thu, 20 Jan 2011 06:56:24 GMT
Author: davsclaus
Date: Thu Jan 20 06:56:24 2011
New Revision: 1061136

URL: http://svn.apache.org/viewvc?rev=1061136&view=rev
Log:
Fixed test on slower servers.

Modified:
    camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailBatchConsumerTest.java
    camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailCommitOnCompletionTest.java
    camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailConsumerUnsupportedCharsetTest.java
    camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailDoNotDeleteIfProcessFailsTest.java
    camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailFetchSizeTest.java
    camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailFetchSizeZeroTest.java
    camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailMaxMessagesPerPollTest.java
    camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailProcessOnlyUnseenMessagesTest.java
    camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailShutdownCompleteAllTasksTest.java
    camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailShutdownCompleteCurrentTaskOnlyTest.java
    camel/trunk/components/camel-nagios/src/test/java/org/apache/camel/component/nagios/NagiosTest.java

Modified: camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailBatchConsumerTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailBatchConsumerTest.java?rev=1061136&r1=1061135&r2=1061136&view=diff
==============================================================================
--- camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailBatchConsumerTest.java
(original)
+++ camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailBatchConsumerTest.java
Thu Jan 20 06:56:24 2011
@@ -34,9 +34,14 @@ import org.springframework.mail.javamail
  */
 public class MailBatchConsumerTest extends CamelTestSupport {
 
+    @Override
+    public void setUp() throws Exception {
+        prepareMailbox();
+        super.setUp();
+    }
+
     @Test
     public void testBatchConsumer() throws Exception {
-        prepareMailbox();
         Mailbox mailbox = Mailbox.get("jones@localhost");
         assertEquals(5, mailbox.size());
 

Modified: camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailCommitOnCompletionTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailCommitOnCompletionTest.java?rev=1061136&r1=1061135&r2=1061136&view=diff
==============================================================================
--- camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailCommitOnCompletionTest.java
(original)
+++ camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailCommitOnCompletionTest.java
Thu Jan 20 06:56:24 2011
@@ -35,9 +35,14 @@ import org.springframework.mail.javamail
  */
 public class MailCommitOnCompletionTest extends CamelTestSupport {
 
+    @Override
+    public void setUp() throws Exception {
+        prepareMailbox();
+        super.setUp();
+    }
+
     @Test
     public void testCommitOnCompletion() throws Exception {
-        prepareMailbox();
         Mailbox mailbox = Mailbox.get("jones@localhost");
         assertEquals(5, mailbox.size());
 

Modified: camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailConsumerUnsupportedCharsetTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailConsumerUnsupportedCharsetTest.java?rev=1061136&r1=1061135&r2=1061136&view=diff
==============================================================================
--- camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailConsumerUnsupportedCharsetTest.java
(original)
+++ camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailConsumerUnsupportedCharsetTest.java
Thu Jan 20 06:56:24 2011
@@ -33,10 +33,14 @@ import org.springframework.mail.javamail
  */
 public class MailConsumerUnsupportedCharsetTest extends CamelTestSupport {
 
-    @Test
-    public void testConsumeUnsupportedCharset() throws Exception {
+    @Override
+    public void setUp() throws Exception {
         prepareMailbox();
+        super.setUp();
+    }
 
+    @Test
+    public void testConsumeUnsupportedCharset() throws Exception {
         MockEndpoint mock = getMockEndpoint("mock:result");
         mock.expectedBodiesReceived("Bye World");
 

Modified: camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailDoNotDeleteIfProcessFailsTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailDoNotDeleteIfProcessFailsTest.java?rev=1061136&r1=1061135&r2=1061136&view=diff
==============================================================================
--- camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailDoNotDeleteIfProcessFailsTest.java
(original)
+++ camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailDoNotDeleteIfProcessFailsTest.java
Thu Jan 20 06:56:24 2011
@@ -37,10 +37,14 @@ public class MailDoNotDeleteIfProcessFai
 
     private static int counter;
 
-    @Test
-    public void testRoolbackIfProcessFails() throws Exception {
+    @Override
+    public void setUp() throws Exception {
         prepareMailbox();
+        super.setUp();
+    }
 
+    @Test
+    public void testRoolbackIfProcessFails() throws Exception {
         getMockEndpoint("mock:result").expectedBodiesReceived("Message 1");
         // the first 2 attempt should fail
         getMockEndpoint("mock:error").expectedMessageCount(2);

Modified: camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailFetchSizeTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailFetchSizeTest.java?rev=1061136&r1=1061135&r2=1061136&view=diff
==============================================================================
--- camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailFetchSizeTest.java
(original)
+++ camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailFetchSizeTest.java
Thu Jan 20 06:56:24 2011
@@ -33,9 +33,14 @@ import org.springframework.mail.javamail
  */
 public class MailFetchSizeTest extends CamelTestSupport {
 
+    @Override
+    public void setUp() throws Exception {
+        prepareMailbox();
+        super.setUp();
+    }
+
     @Test
     public void testFetchSize() throws Exception {
-        prepareMailbox();
         Mailbox mailbox = Mailbox.get("jones@localhost");
         assertEquals(5, mailbox.size());
 

Modified: camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailFetchSizeZeroTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailFetchSizeZeroTest.java?rev=1061136&r1=1061135&r2=1061136&view=diff
==============================================================================
--- camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailFetchSizeZeroTest.java
(original)
+++ camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailFetchSizeZeroTest.java
Thu Jan 20 06:56:24 2011
@@ -33,9 +33,14 @@ import org.springframework.mail.javamail
  */
 public class MailFetchSizeZeroTest extends CamelTestSupport {
 
+    @Override
+    public void setUp() throws Exception {
+        prepareMailbox();
+        super.setUp();
+    }
+
     @Test
     public void testFetchSize() throws Exception {
-        prepareMailbox();
         Mailbox mailbox = Mailbox.get("bill@localhost");
         assertEquals(5, mailbox.size());
 

Modified: camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailMaxMessagesPerPollTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailMaxMessagesPerPollTest.java?rev=1061136&r1=1061135&r2=1061136&view=diff
==============================================================================
--- camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailMaxMessagesPerPollTest.java
(original)
+++ camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailMaxMessagesPerPollTest.java
Thu Jan 20 06:56:24 2011
@@ -34,10 +34,14 @@ import org.springframework.mail.javamail
  */
 public class MailMaxMessagesPerPollTest extends CamelTestSupport {
 
-    @Test
-    public void testBatchConsumer() throws Exception {
+    @Override
+    public void setUp() throws Exception {
         prepareMailbox();
+        super.setUp();
+    }
 
+    @Test
+    public void testBatchConsumer() throws Exception {
         MockEndpoint mock = getMockEndpoint("mock:result");
         mock.setResultWaitTime(2000);
         mock.expectedMessageCount(3);

Modified: camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailProcessOnlyUnseenMessagesTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailProcessOnlyUnseenMessagesTest.java?rev=1061136&r1=1061135&r2=1061136&view=diff
==============================================================================
--- camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailProcessOnlyUnseenMessagesTest.java
(original)
+++ camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailProcessOnlyUnseenMessagesTest.java
Thu Jan 20 06:56:24 2011
@@ -34,10 +34,14 @@ import org.springframework.mail.javamail
  */
 public class MailProcessOnlyUnseenMessagesTest extends CamelTestSupport {
 
-    @Test
-    public void testProcessOnlyUnseenMessages() throws Exception {
+    @Override
+    public void setUp() throws Exception {
         prepareMailbox();
+        super.setUp();
+    }
 
+    @Test
+    public void testProcessOnlyUnseenMessages() throws Exception {
         sendBody("direct:a", "Message 3");
 
         MockEndpoint mock = getMockEndpoint("mock:result");

Modified: camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailShutdownCompleteAllTasksTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailShutdownCompleteAllTasksTest.java?rev=1061136&r1=1061135&r2=1061136&view=diff
==============================================================================
--- camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailShutdownCompleteAllTasksTest.java
(original)
+++ camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailShutdownCompleteAllTasksTest.java
Thu Jan 20 06:56:24 2011
@@ -36,8 +36,8 @@ public class MailShutdownCompleteAllTask
 
     @Override
     public void setUp() throws Exception {
-        super.setUp();
         prepareMailbox();
+        super.setUp();
     }
 
     @Override

Modified: camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailShutdownCompleteCurrentTaskOnlyTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailShutdownCompleteCurrentTaskOnlyTest.java?rev=1061136&r1=1061135&r2=1061136&view=diff
==============================================================================
--- camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailShutdownCompleteCurrentTaskOnlyTest.java
(original)
+++ camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailShutdownCompleteCurrentTaskOnlyTest.java
Thu Jan 20 06:56:24 2011
@@ -36,8 +36,8 @@ public class MailShutdownCompleteCurrent
 
     @Override
     public void setUp() throws Exception {
-        super.setUp();
         prepareMailbox();
+        super.setUp();
     }
 
     @Test

Modified: camel/trunk/components/camel-nagios/src/test/java/org/apache/camel/component/nagios/NagiosTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-nagios/src/test/java/org/apache/camel/component/nagios/NagiosTest.java?rev=1061136&r1=1061135&r2=1061136&view=diff
==============================================================================
--- camel/trunk/components/camel-nagios/src/test/java/org/apache/camel/component/nagios/NagiosTest.java
(original)
+++ camel/trunk/components/camel-nagios/src/test/java/org/apache/camel/component/nagios/NagiosTest.java
Thu Jan 20 06:56:24 2011
@@ -79,7 +79,7 @@ public class NagiosTest extends CamelTes
         assertMockEndpointsSatisfied();
 
         // sleep a little to let nagios stub process the payloads
-        Thread.sleep(1000);
+        Thread.sleep(2000);
 
         assertEquals(1, nagios.getMessagePayloadList().size());
 
@@ -106,7 +106,7 @@ public class NagiosTest extends CamelTes
         assertMockEndpointsSatisfied();
 
         // sleep a little to let nagios stub process the payloads
-        Thread.sleep(2000);
+        Thread.sleep(3000);
 
         assertEquals(2, nagios.getMessagePayloadList().size());
 
@@ -137,7 +137,7 @@ public class NagiosTest extends CamelTes
         assertMockEndpointsSatisfied();
 
         // sleep a little to let nagios stub process the payloads
-        Thread.sleep(1000);
+        Thread.sleep(2000);
 
         assertEquals(1, nagios.getMessagePayloadList().size());
 
@@ -162,7 +162,7 @@ public class NagiosTest extends CamelTes
         assertMockEndpointsSatisfied();
 
         // sleep a little to let nagios stub process the payloads
-        Thread.sleep(1000);
+        Thread.sleep(2000);
 
         assertEquals(1, nagios.getMessagePayloadList().size());
 
@@ -191,7 +191,7 @@ public class NagiosTest extends CamelTes
         assertMockEndpointsSatisfied();
 
         // sleep a little to let nagios stub process the payloads
-        Thread.sleep(1000);
+        Thread.sleep(2000);
 
         assertEquals(1, nagios.getMessagePayloadList().size());
 



Mime
View raw message