[jboss-cvs] JBossCache/tests/functional/org/jboss/cache/transaction ...
Brian Stansberry
brian.stansberry at jboss.com
Tue Nov 21 23:02:15 EST 2006
User: bstansberry
Date: 06/11/21 23:02:15
Modified: tests/functional/org/jboss/cache/transaction Tag:
Branch_JBossCache_1_4_0
IsolationLevelSerializableTest.java
Log:
We get a TimeoutException if test passes; don't fail because of it :)
Revision Changes Path
No revision
No revision
1.1.2.2 +7 -1 JBossCache/tests/functional/org/jboss/cache/transaction/Attic/IsolationLevelSerializableTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: IsolationLevelSerializableTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/transaction/Attic/IsolationLevelSerializableTest.java,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -b -r1.1.2.1 -r1.1.2.2
--- IsolationLevelSerializableTest.java 21 Nov 2006 23:29:51 -0000 1.1.2.1
+++ IsolationLevelSerializableTest.java 22 Nov 2006 04:02:15 -0000 1.1.2.2
@@ -11,6 +11,7 @@
import org.jboss.cache.Fqn;
import org.jboss.cache.TreeCache;
import org.jboss.cache.lock.IsolationLevel;
+import org.jboss.cache.lock.TimeoutException;
import javax.transaction.NotSupportedException;
import javax.transaction.SystemException;
@@ -23,7 +24,7 @@
*
* @author <a href="mailto:ovidiu at jboss.org">Ovidiu Feodorov</a>
*
- * @version $Id: IsolationLevelSerializableTest.java,v 1.1.2.1 2006/11/21 23:29:51 bstansberry Exp $
+ * @version $Id: IsolationLevelSerializableTest.java,v 1.1.2.2 2006/11/22 04:02:15 bstansberry Exp $
*/
public class IsolationLevelSerializableTest extends TestCase
@@ -53,6 +54,7 @@
cache.setCacheMode(TreeCache.LOCAL);
cache.setIsolationLevel(IsolationLevel.SERIALIZABLE);
cache.setTransactionManagerLookupClass(DummyTransactionManagerLookup.class.getName());
+ cache.setLockAcquisitionTimeout(1000);
cache.startService();
}
@@ -131,6 +133,10 @@
assertEquals("2nd thread cannot see uncommitted changes",
VALUE, cache.get(FQN, KEY));
}
+ catch (TimeoutException t)
+ {
+ // ignore, this is good
+ }
finally
{
System.out.println("reader thread exits");
More information about the jboss-cvs-commits
mailing list