tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sl...@apache.org
Subject svn commit: r574019 - /incubator/tuscany/java/sca/itest/conversations/src/test/java/org/apache/tuscany/sca/itest/conversational/ConversationalAgeTestCase.java
Date Sun, 09 Sep 2007 15:21:34 GMT
Author: slaws
Date: Sun Sep  9 08:21:33 2007
New Revision: 574019

URL: http://svn.apache.org/viewvc?rev=574019&view=rev
Log:
Add exception tests to all conversational age tests

Modified:
    incubator/tuscany/java/sca/itest/conversations/src/test/java/org/apache/tuscany/sca/itest/conversational/ConversationalAgeTestCase.java

Modified: incubator/tuscany/java/sca/itest/conversations/src/test/java/org/apache/tuscany/sca/itest/conversational/ConversationalAgeTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/conversations/src/test/java/org/apache/tuscany/sca/itest/conversational/ConversationalAgeTestCase.java?rev=574019&r1=574018&r2=574019&view=diff
==============================================================================
--- incubator/tuscany/java/sca/itest/conversations/src/test/java/org/apache/tuscany/sca/itest/conversational/ConversationalAgeTestCase.java
(original)
+++ incubator/tuscany/java/sca/itest/conversations/src/test/java/org/apache/tuscany/sca/itest/conversational/ConversationalAgeTestCase.java
Sun Sep  9 08:21:33 2007
@@ -55,8 +55,12 @@
         conversationalService.initializeCount(42);
         Assert.assertEquals(42, conversationalService.retrieveCount());
         Assert.assertEquals(42, conversationalService.retrieveCount());
-        Thread.sleep(3100);
-        Assert.assertEquals(0, conversationalService.retrieveCount());
+        Thread.sleep(500);
+        try {
+            Assert.assertEquals(42, conversationalService.retrieveCount());
+        } catch (ConversationEndedException e) {
+            Assert.fail();
+        }
     }
 
     @Test
@@ -88,8 +92,12 @@
         conversationalService.initializeCount(42);
         Assert.assertEquals(42, conversationalService.retrieveCount());
         Assert.assertEquals(42, conversationalService.retrieveCount());
-        Thread.sleep(3100);
-        Assert.assertEquals(0, conversationalService.retrieveCount());
+        Thread.sleep(1100);
+        try {
+            Assert.assertEquals(0, conversationalService.retrieveCount());
+        } catch (ConversationEndedException e) {
+            // expected
+        }
     }
 
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org


Mime
View raw message