Author: ffang
Date: Thu Jan 14 06:48:46 2010
New Revision: 899078

URL: http://svn.apache.org/viewvc?rev=899078&view=rev
Log:
[SMXCOMP-695]WSNComponentTest intermitently fail or hang on slow machine

Modified:
    
servicemix/components/engines/servicemix-wsn2005/trunk/src/test/java/org/apache/servicemix/wsn/component/WSNComponentTest.java

Modified: 
servicemix/components/engines/servicemix-wsn2005/trunk/src/test/java/org/apache/servicemix/wsn/component/WSNComponentTest.java
URL: 
http://svn.apache.org/viewvc/servicemix/components/engines/servicemix-wsn2005/trunk/src/test/java/org/apache/servicemix/wsn/component/WSNComponentTest.java?rev=899078&r1=899077&r2=899078&view=diff
==============================================================================
--- 
servicemix/components/engines/servicemix-wsn2005/trunk/src/test/java/org/apache/servicemix/wsn/component/WSNComponentTest.java
 (original)
+++ 
servicemix/components/engines/servicemix-wsn2005/trunk/src/test/java/org/apache/servicemix/wsn/component/WSNComponentTest.java
 Thu Jan 14 06:48:46 2010
@@ -134,7 +134,7 @@
 
         wsnBroker.notify("myTopic", parse("<hello>world</hello>"));
         // Wait for notification
-        Thread.sleep(500);
+        Thread.sleep(2000);
 
         receiver.getMessageList().assertMessagesReceived(1);
         NormalizedMessage msg = (NormalizedMessage) 
receiver.getMessageList().getMessages().get(0);
@@ -142,7 +142,7 @@
         assertEquals("Notify", node.getLocalName());
 
         // Wait for acks to be processed
-        Thread.sleep(500);
+        Thread.sleep(5000);
     }
 
     public void testNotifyWithJbiWrapper() throws Exception {
@@ -156,7 +156,7 @@
 
         wsnBroker.notify("myTopic", parse("<hello>world</hello>"));
         // Wait for notification
-        Thread.sleep(500);
+        Thread.sleep(2000);
 
         receiver.getMessageList().assertMessagesReceived(1);
         NormalizedMessage msg = (NormalizedMessage) 
receiver.getMessageList().getMessages().get(0);
@@ -164,7 +164,7 @@
         assertEquals("Notify", node.getLocalName());
 
         // Wait for acks to be processed
-        Thread.sleep(500);
+        Thread.sleep(5000);
     }
 
     public void testRawNotify() throws Exception {
@@ -180,7 +180,7 @@
         // END SNIPPET: notify
 
         // Wait for notification
-        Thread.sleep(500);
+        Thread.sleep(2000);
 
         receiver.getMessageList().assertMessagesReceived(1);
         NormalizedMessage msg = (NormalizedMessage) 
receiver.getMessageList().getMessages().get(0);
@@ -188,7 +188,7 @@
         assertEquals("hello", node.getLocalName());
 
         // Wait for acks to be processed
-        Thread.sleep(500);
+        Thread.sleep(5000);
     }
 
     public void testUnsubscribe() throws Exception {
@@ -199,7 +199,7 @@
 
         wsnBroker.notify("myTopic", new Notify());
         // Wait for notification
-        Thread.sleep(500);
+        Thread.sleep(2000);
 
         assertEquals(1, pullPoint.getMessages(0).size());
 
@@ -207,12 +207,12 @@
 
         wsnBroker.notify("myTopic", new Notify());
         // Wait for notification
-        Thread.sleep(500);
+        Thread.sleep(2000);
 
         assertEquals(0, pullPoint.getMessages(0).size());
 
         // Wait for acks to be processed
-        Thread.sleep(500);
+        Thread.sleep(5000);
     }
 
     public void testPauseResume() throws Exception {
@@ -221,7 +221,7 @@
 
         wsnBroker.notify("myTopic", new Notify());
         // Wait for notification
-        Thread.sleep(500);
+        Thread.sleep(2000);
 
         assertEquals(1, pullPoint.getMessages(0).size());
 
@@ -229,7 +229,7 @@
 
         wsnBroker.notify("myTopic", new Notify());
         // Wait for notification
-        Thread.sleep(500);
+        Thread.sleep(2000);
 
         assertEquals(0, pullPoint.getMessages(0).size());
 
@@ -237,12 +237,12 @@
 
         wsnBroker.notify("myTopic", new Notify());
         // Wait for notification
-        Thread.sleep(500);
+        Thread.sleep(2000);
 
         assertEquals(1, pullPoint.getMessages(0).size());
 
         // Wait for acks to be processed
-        Thread.sleep(500);
+        Thread.sleep(5000);
     }
 
     public void testPull() throws Exception {
@@ -251,14 +251,14 @@
 
         wsnBroker.notify("myTopic", new Notify());
         // Wait for notification
-        Thread.sleep(500);
+        Thread.sleep(2000);
 
         List<NotificationMessageHolderType> msgs = pullPoint.getMessages(0);
         assertNotNull(msgs);
         assertEquals(1, msgs.size());
 
         // Wait for acks to be processed
-        Thread.sleep(500);
+        Thread.sleep(5000);
     }
 
     public void testPullWithFilter() throws Exception {
@@ -269,21 +269,21 @@
 
         wsnBroker.notify("myTopic", parse("<msg type='a'/>"));
         // Wait for notification
-        Thread.sleep(500);
+        Thread.sleep(2000);
 
         assertEquals(1, pullPoint1.getMessages(0).size());
         assertEquals(0, pullPoint2.getMessages(0).size());
 
         wsnBroker.notify("myTopic", parse("<msg type='b'/>"));
         // Wait for notification
-        Thread.sleep(500);
+        Thread.sleep(5000);
 
         assertEquals(0, pullPoint1.getMessages(0).size());
         assertEquals(1, pullPoint2.getMessages(0).size());
 
         wsnBroker.notify("myTopic", parse("<msg type='c'/>"));
         // Wait for notification
-        Thread.sleep(500);
+        Thread.sleep(2000);
 
         assertEquals(0, pullPoint1.getMessages(0).size());
         assertEquals(0, pullPoint2.getMessages(0).size());
@@ -326,7 +326,7 @@
         PullPoint pullPoint = new PullPoint(
                         client.getContext(),
                         
AbstractWSAClient.createWSA("http://www.consumer.org/service/endpoint";));
-        Thread.sleep(500);
+        Thread.sleep(2000);
         assertEquals(1, pullPoint.getMessages(0).size());
     }
 
@@ -348,7 +348,7 @@
 
         wsnBroker.notify("myTopic", parse("<hello>world</hello>"));
         // Wait for notification
-        Thread.sleep(500);
+        Thread.sleep(2000);
         receiver.getMessageList().assertMessagesReceived(1);
         receiver.getMessageList().flushMessages();
 
@@ -357,7 +357,7 @@
 
         wsnBroker.notify("myTopic", parse("<hello>world</hello>"));
         // Wait for notification
-        Thread.sleep(500);
+        Thread.sleep(2000);
         assertEquals(0, receiver.getMessageList().flushMessages().size());
 
         wsnComponent.getServiceUnitManager().init("subscription", 
path.getAbsolutePath());
@@ -365,7 +365,7 @@
 
         wsnBroker.notify("myTopic", parse("<hello>world</hello>"));
         // Wait for notification
-        Thread.sleep(500);
+        Thread.sleep(2000);
         receiver.getMessageList().assertMessagesReceived(1);
         receiver.getMessageList().flushMessages();
     }


Reply via email to