[jboss-cvs] JBossCache/tests/functional/org/jboss/cache/loader/deadlock ...
Manik Surtani
msurtani at jboss.com
Sat Dec 30 12:49:59 EST 2006
User: msurtani
Date: 06/12/30 12:49:59
Modified: tests/functional/org/jboss/cache/loader/deadlock
ConcurrentCreationDeadlockTest.java
Log:
Major changes to restructure cache and node object model
Revision Changes Path
1.8 +13 -13 JBossCache/tests/functional/org/jboss/cache/loader/deadlock/ConcurrentCreationDeadlockTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: ConcurrentCreationDeadlockTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/loader/deadlock/ConcurrentCreationDeadlockTest.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- ConcurrentCreationDeadlockTest.java 25 Oct 2006 04:50:20 -0000 1.7
+++ ConcurrentCreationDeadlockTest.java 30 Dec 2006 17:49:59 -0000 1.8
@@ -3,8 +3,8 @@
import EDU.oswego.cs.dl.util.concurrent.Latch;
import junit.framework.Test;
import junit.framework.TestSuite;
+import org.jboss.cache.CacheImpl;
import org.jboss.cache.Fqn;
-import org.jboss.cache.TreeCache;
import org.jboss.cache.config.Configuration;
import org.jboss.cache.factories.XmlConfigurationParser;
import org.jboss.cache.loader.AbstractCacheLoaderTestBase;
@@ -96,7 +96,7 @@
/**
* The cache under test.
*/
- private TreeCache m_cache = null;
+ private CacheImpl cache = null;
static
{
@@ -125,11 +125,11 @@
m_contextFactory = System.getProperty(Context.INITIAL_CONTEXT_FACTORY);
System.setProperty(Context.INITIAL_CONTEXT_FACTORY, CONTEXT_FACTORY);
DummyTransactionManager.getInstance();
- m_cache = new TreeCache();
+ cache = new CacheImpl();
XmlConfigurationParser parser = new XmlConfigurationParser();
Configuration c = parser.parseFile("META-INF/replSync-service.xml");
- m_cache.setConfiguration(c);
+ cache.setConfiguration(c);
c.setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
}
@@ -141,8 +141,8 @@
{
super.tearDown();
DummyTransactionManager.destroy();
- m_cache.stop();
- m_cache = null;
+ cache.stop();
+ cache = null;
if (m_contextFactory != null)
{
System.setProperty(Context.INITIAL_CONTEXT_FACTORY,
@@ -161,13 +161,13 @@
private void startCache(Configuration.CacheMode cacheMode, String cacheLoaderClass)
throws Exception
{
- m_cache.getConfiguration().setCacheMode(cacheMode);
+ cache.getConfiguration().setCacheMode(cacheMode);
if (cacheLoaderClass != null)
{
- m_cache.getConfiguration().setCacheLoaderConfig(getSingleCacheLoaderConfig("", cacheLoaderClass, "", false, false, false));
+ cache.getConfiguration().setCacheLoaderConfig(getSingleCacheLoaderConfig("", cacheLoaderClass, "", false, false, false));
}
- m_cache.create();
- m_cache.start();
+ cache.create();
+ cache.start();
}
/**
@@ -396,8 +396,8 @@
* A worker thread that applies the concurrent modifications.
*
* @author Marian Nikolov
- * @author $Author: bstansberry $
- * @version $Date: 2006/10/25 04:50:20 $
+ * @author $Author: msurtani $
+ * @version $Date: 2006/12/30 17:49:59 $
*/
private class Worker extends Thread
{
@@ -470,7 +470,7 @@
Fqn fqn = new Fqn(new Fqn("NODE"), new Integer(i));
for (int m = 0; m < m_modificationsPerTx; m++)
{
- m_cache.put(fqn, new Integer(m), new Integer(i));
+ cache.put(fqn, new Integer(m), new Integer(i));
if (checkAndSetState())
{
return;
More information about the jboss-cvs-commits
mailing list