Author: manik.surtani(a)jboss.com
Date: 2008-10-02 06:00:50 -0400 (Thu, 02 Oct 2008)
New Revision: 6825
Removed:
core/branches/1.4.X/tests/functional/org/jboss/cache/transaction/IsolationLevelReadUncommitedTest.java
Log:
removed broken test
Deleted:
core/branches/1.4.X/tests/functional/org/jboss/cache/transaction/IsolationLevelReadUncommitedTest.java
===================================================================
---
core/branches/1.4.X/tests/functional/org/jboss/cache/transaction/IsolationLevelReadUncommitedTest.java 2008-10-02
07:47:38 UTC (rev 6824)
+++
core/branches/1.4.X/tests/functional/org/jboss/cache/transaction/IsolationLevelReadUncommitedTest.java 2008-10-02
10:00:50 UTC (rev 6825)
@@ -1,105 +0,0 @@
-package org.jboss.cache.transaction;
-
-import EDU.oswego.cs.dl.util.concurrent.Latch;
-
-import javax.transaction.Transaction;
-import javax.transaction.SystemException;
-import javax.transaction.NotSupportedException;
-
-import org.jboss.cache.TreeCache;
-import org.jboss.cache.DummyTransactionManagerLookup;
-import org.jboss.cache.lock.IsolationLevel;
-import junit.framework.TestCase;
-
-/**
- * @author Mircea.Markus(a)jboss.com
- */
-
-// --- Why was this test added in the first place? It was added in r.5178 by mmarkus.
Does this pertain to any specific JIRA? - Manik (Oct 2008)
-
-public class IsolationLevelReadUncommitedTest {/*extends TestCase {
-
- private TreeCache cache = null;
-
- private Transaction startTransaction() throws SystemException, NotSupportedException
- {
- DummyTransactionManager mgr = DummyTransactionManager.getInstance();
- mgr.begin();
- return mgr.getTransaction();
- }
-
- protected void setUp() throws Exception
- {
- super.setUp();
- cache = new TreeCache();
- cache.setCacheMode(TreeCache.LOCAL);
- cache.setIsolationLevel(IsolationLevel.READ_UNCOMMITTED);
-
cache.setTransactionManagerLookupClass(DummyTransactionManagerLookup.class.getName());
- cache.setLockAcquisitionTimeout(1000);
- cache.startService();
- }
-
-
- protected void tearDown() throws Exception
- {
- super.tearDown();
-
- cache.stopService();
- cache.destroyService();
- cache = null;
- }
-
- /**
- * Tests following scenario:
- * tx1 starts and create /a/b/c
- * tx2 starts and adds a key value under /a/b
- * tx2 commits
- * tx1 rollabcks
- *
- * the key/value added bu tx should be in the cache still, and should not be affected
by tx1 rollback.
- */
- /*
- public void testInterlacedTx() throws Exception
- {
- Transaction tx = startTransaction();
- cache.put("/a/b/c", "key", "value");
- System.out.println("Tx1 just added /a/b/c");
- System.out.println(cache.printLockInfo());
- Latch latch = new Latch();
- TxThread txThread = new TxThread(cache, latch);
- txThread.start();
- latch.acquire();
- tx.rollback();
- System.out.println("Tx1 just rolled back");
- System.out.println(cache.printLockInfo());
-
- assertNotNull(cache.get("/a/b"));
- assertNotNull(cache.get("/a/b", "newKey"));
- }
-
- private class TxThread extends Thread
- {
- TreeCache cache;
- Latch latch;
-
- private TxThread(TreeCache cache, Latch latch) {
- this.cache = cache;
- this.latch = latch;
- }
-
- public void run() {
- try {
- Transaction tx = startTransaction();
- cache.put("/a/b","newKey","newValue");
- System.out.println("Tx2 just updated /a/b");
- System.out.println(cache.printLockInfo());
- tx.commit();
- System.out.println("Tx2 commited");
- latch.release();
- } catch (Exception e) {
- e.printStackTrace();
- throw new RuntimeException();
- }
- }
- } */
-}
\ No newline at end of file
Show replies by date