Author: manik.surtani(a)jboss.com
Date: 2008-07-03 15:57:53 -0400 (Thu, 03 Jul 2008)
New Revision: 6164
Removed:
core/trunk/src/test/java/org/jboss/cache/api/mvcc/repeatable_read/RepeatableReadTestBase.java
Log:
Sync commit and rollback phases
Deleted:
core/trunk/src/test/java/org/jboss/cache/api/mvcc/repeatable_read/RepeatableReadTestBase.java
===================================================================
---
core/trunk/src/test/java/org/jboss/cache/api/mvcc/repeatable_read/RepeatableReadTestBase.java 2008-07-03
15:27:48 UTC (rev 6163)
+++
core/trunk/src/test/java/org/jboss/cache/api/mvcc/repeatable_read/RepeatableReadTestBase.java 2008-07-03
19:57:53 UTC (rev 6164)
@@ -1,88 +0,0 @@
-package org.jboss.cache.api.mvcc.repeatable_read;
-
-import org.jboss.cache.api.mvcc.LockTestBase;
-
-import javax.transaction.Transaction;
-
-public abstract class RepeatableReadTestBase extends LockTestBase
-{
- protected RepeatableReadTestBase()
- {
- repeatableRead = true;
- }
-
- public void testRepeatableReadWithRemove() throws Exception
- {
- cache.put(AB, "k", "v");
-
- tm.begin();
- assert cache.getNode(AB) != null;
- Transaction reader = tm.suspend();
-
- tm.begin();
- assert cache.removeNode(AB);
- assert cache.getNode(AB) == null;
- tm.commit();
-
- assert cache.getNode(AB) == null;
-
- tm.resume(reader);
- assert cache.getNode(AB) != null;
- assert "v".equals(cache.get(AB, "k"));
- tm.commit();
-
- assert cache.getNode(AB) == null;
- assertNoLocks();
- }
-
- public void testRepeatableReadWithEvict() throws Exception
- {
- cache.put(AB, "k", "v");
-
- tm.begin();
- assert cache.getNode(AB) != null;
- Transaction reader = tm.suspend();
-
- tm.begin();
- cache.evict(AB);
- assert cache.getNode(AB) == null;
- tm.commit();
-
- assert cache.getNode(AB) == null;
-
- tm.resume(reader);
- assert cache.getNode(AB) != null;
- assert "v".equals(cache.get(AB, "k"));
- tm.commit();
-
- assert cache.getNode(AB) == null;
- assertNoLocks();
- }
-
- public void testRepeatableReadWithNull() throws Exception
- {
- assert cache.getNode(AB) == null;
-
- tm.begin();
- assert cache.getNode(AB) == null;
- Transaction reader = tm.suspend();
-
- tm.begin();
- cache.put(AB, "k", "v");
- assert cache.getNode(AB) != null;
- assert "v".equals(cache.get(AB, "k"));
- tm.commit();
-
- assert cache.getNode(AB) != null;
- assert "v".equals(cache.get(AB, "k"));
-
- tm.resume(reader);
- assert cache.getNode(AB) == null;
- assert cache.get(AB, "k") == null;
- tm.commit();
-
- assert cache.getNode(AB) != null;
- assert "v".equals(cache.get(AB, "k"));
- assertNoLocks();
- }
-}
Show replies by date