[jboss-cvs] JBossCache/tests/functional/org/jboss/cache/lock ...
Manik Surtani
msurtani at jboss.com
Thu Jul 20 06:31:35 EDT 2006
User: msurtani
Date: 06/07/20 06:31:35
Modified: tests/functional/org/jboss/cache/lock LockReleaseTest.java
UpgradeLockTest.java
Log:
Fixed some broken UTs to use the new xml parsers, cache factories, etc.
Revision Changes Path
1.2 +7 -6 JBossCache/tests/functional/org/jboss/cache/lock/LockReleaseTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: LockReleaseTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/lock/LockReleaseTest.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- LockReleaseTest.java 8 Jul 2005 05:58:11 -0000 1.1
+++ LockReleaseTest.java 20 Jul 2006 10:31:35 -0000 1.2
@@ -14,7 +14,6 @@
import org.apache.commons.logging.Log;
import org.jboss.cache.Fqn;
import org.jboss.cache.TreeCache;
-import org.jboss.cache.lock.IsolationLevel;
import org.jboss.cache.transaction.DummyTransactionManager;
import javax.naming.Context;
@@ -27,7 +26,7 @@
* Verifies that there are no read locks held when a transaction ends.
*
* @author Bela Ban
- * @version $Id: LockReleaseTest.java,v 1.1 2005/07/08 05:58:11 msurtani Exp $
+ * @version $Id: LockReleaseTest.java,v 1.2 2006/07/20 10:31:35 msurtani Exp $
*/
public class LockReleaseTest extends TestCase {
TreeCache cache=null;
@@ -82,10 +81,12 @@
}
TreeCache createCache(IsolationLevel level) throws Exception {
- TreeCache c=new TreeCache("test", null, 10000);
- c.setTransactionManagerLookupClass("org.jboss.cache.JBossTransactionManagerLookup");
- c.setLockAcquisitionTimeout(500);
- c.setIsolationLevel(level);
+ TreeCache c=new TreeCache();
+ c.getConfiguration().setClusterName("test");
+ c.getConfiguration().setInitialStateRetrievalTimeout(10000);
+ c.getConfiguration().setTransactionManagerLookupClass("org.jboss.cache.JBossTransactionManagerLookup");
+ c.getConfiguration().setLockAcquisitionTimeout(500);
+ c.getConfiguration().setIsolationLevel(level);
c.createService();
c.startService();
return c;
1.3 +7 -5 JBossCache/tests/functional/org/jboss/cache/lock/UpgradeLockTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: UpgradeLockTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/lock/UpgradeLockTest.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- UpgradeLockTest.java 5 May 2006 12:06:58 -0000 1.2
+++ UpgradeLockTest.java 20 Jul 2006 10:31:35 -0000 1.3
@@ -24,7 +24,7 @@
* Tests upgrade locks from read -> write
*
* @author Bela Ban
- * @version $Id: UpgradeLockTest.java,v 1.2 2006/05/05 12:06:58 msurtani Exp $
+ * @version $Id: UpgradeLockTest.java,v 1.3 2006/07/20 10:31:35 msurtani Exp $
*/
public class UpgradeLockTest extends TestCase {
TreeCache cache=null;
@@ -79,10 +79,12 @@
}
TreeCache createCache(IsolationLevel level) throws Exception {
- TreeCache c=new TreeCache("test", null, 10000);
- c.setTransactionManagerLookupClass("org.jboss.cache.JBossTransactionManagerLookup");
- c.setLockAcquisitionTimeout(500);
- c.setIsolationLevel(level);
+ TreeCache c=new TreeCache();
+ c.getConfiguration().setClusterName("test");
+ c.getConfiguration().setInitialStateRetrievalTimeout(10000);
+ c.getConfiguration().setTransactionManagerLookupClass("org.jboss.cache.JBossTransactionManagerLookup");
+ c.getConfiguration().setLockAcquisitionTimeout(500);
+ c.getConfiguration().setIsolationLevel(level);
c.createService();
c.startService();
return c;
More information about the jboss-cvs-commits
mailing list