river-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p...@apache.org
Subject svn commit: r1025760 - /incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/txnmanager/GetStateTest.java
Date Wed, 20 Oct 2010 21:19:27 GMT
Author: pats
Date: Wed Oct 20 21:19:27 2010
New Revision: 1025760

URL: http://svn.apache.org/viewvc?rev=1025760&view=rev
Log:
RIVER-361: Tidy up GetStateTest. Set a ten minute limit on final spin loop, require the aborted
transaction to stay aborted, and specifically require the UnknownTransactionException.

Modified:
    incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/txnmanager/GetStateTest.java

Modified: incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/txnmanager/GetStateTest.java
URL: http://svn.apache.org/viewvc/incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/txnmanager/GetStateTest.java?rev=1025760&r1=1025759&r2=1025760&view=diff
==============================================================================
--- incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/txnmanager/GetStateTest.java
(original)
+++ incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/txnmanager/GetStateTest.java
Wed Oct 20 21:19:27 2010
@@ -193,14 +193,18 @@ public class GetStateTest extends TxnMan
             // things happened too quickly so transaction now gone
         }
 
+        long timeout = System.currentTimeMillis() + 10 * 60 * 1000;
         try {
-            while (true) {
+            while (System.currentTimeMillis() < timeout) {
                 state = str.mgr.getState(str.id);
+                if(state != ABORTED) {
+                	throw new TestException("Non-aborted state after abort call");
+                }
             }
-        } catch (TransactionException bte) {
+        } catch (UnknownTransactionException bte) {
             // Expected exception. Second test passed.
             return;
         } catch (RemoteException re) {}
-        throw new TestException( "TransactionException is not raised");
+        throw new TestException( "UnknownTransactionException is not raised");
     }
 }



Mime
View raw message