[jboss-cvs] JBossCache/tests/functional/org/jboss/cache ...
Manik Surtani
msurtani at jboss.com
Fri Aug 25 07:59:03 EDT 2006
User: msurtani
Date: 06/08/25 07:59:03
Modified: tests/functional/org/jboss/cache
TreeCacheFunctionalTest.java
Log:
fixed
- eviction interceptor
- removed putFailFast()
- notifications with null data
Revision Changes Path
1.4 +1 -47 JBossCache/tests/functional/org/jboss/cache/TreeCacheFunctionalTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: TreeCacheFunctionalTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/TreeCacheFunctionalTest.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- TreeCacheFunctionalTest.java 16 Aug 2006 11:15:56 -0000 1.3
+++ TreeCacheFunctionalTest.java 25 Aug 2006 11:59:03 -0000 1.4
@@ -5,18 +5,14 @@
import junit.framework.TestSuite;
import org.jboss.cache.config.Configuration;
import org.jboss.cache.lock.IsolationLevel;
-import org.jboss.cache.lock.TimeoutException;
-import org.jboss.cache.transaction.DummyTransactionManager;
-import javax.transaction.NotSupportedException;
-import javax.transaction.SystemException;
import javax.transaction.Transaction;
import java.util.HashMap;
/**
* Simple functional tests for TreeCache
* @author Bela Ban
- * @version $Id: TreeCacheFunctionalTest.java,v 1.3 2006/08/16 11:15:56 msurtani Exp $
+ * @version $Id: TreeCacheFunctionalTest.java,v 1.4 2006/08/25 11:59:03 msurtani Exp $
*/
public class TreeCacheFunctionalTest extends TestCase {
TreeCache cache=null;
@@ -111,50 +107,8 @@
assertEquals(0, cache.getLockTable().size());
}
- public void testFailFastWith2Transactions() throws Exception, NotSupportedException {
- tx=startTransaction();
- cache.put("/a/b/c", KEY, VALUE);
-
- class Loser extends Thread {
- public void run() {
- Transaction trans=null;
- try {
- trans=startTransaction();
- cache.putFailFast(Fqn.fromString("/a/b/c"), KEY, VALUE, 500);
- fail("this should fail as /a/b/c is held by another thread");
- }
- catch(TimeoutException timeoutEx) {
- System.out.println("got TimeoutException (as expected)");
- }
- catch(Exception e) {
- ex=e;
- }
- }
- }
-
- System.out.println("locks before loser: " + cache.printLockInfo());
- Loser loser=new Loser();
- loser.start();
- loser.join();
- tx.commit();
- }
-
-
- Transaction startTransaction() throws SystemException, NotSupportedException {
- DummyTransactionManager mgr=DummyTransactionManager.getInstance();
- mgr.begin();
- Transaction tmptx=mgr.getTransaction();
- return tmptx;
- }
-
-
-
public static Test suite() {
return new TestSuite(TreeCacheFunctionalTest.class);
}
- //public static void main(String[] args) {
- // junit.textui.TestRunner.run(suite());
- //}
-
}
More information about the jboss-cvs-commits
mailing list