[jboss-cvs] JBossCache/tests/functional/org/jboss/cache/eviction ...
Manik Surtani
msurtani at jboss.com
Tue Feb 27 08:25:45 EST 2007
User: msurtani
Date: 07/02/27 08:25:45
Modified: tests/functional/org/jboss/cache/eviction
ConcurrentEvictionTest.java
Log:
tmp dir configurable
Revision Changes Path
1.10 +11 -3 JBossCache/tests/functional/org/jboss/cache/eviction/ConcurrentEvictionTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: ConcurrentEvictionTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/eviction/ConcurrentEvictionTest.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- ConcurrentEvictionTest.java 7 Feb 2007 22:06:39 -0000 1.9
+++ ConcurrentEvictionTest.java 27 Feb 2007 13:25:45 -0000 1.10
@@ -13,18 +13,23 @@
import org.jboss.cache.CacheImpl;
import org.jboss.cache.DefaultCacheFactory;
import org.jboss.cache.Fqn;
+import org.jboss.cache.loader.FileCacheLoaderConfig;
import org.jboss.cache.misc.TestingUtil;
+import java.util.Properties;
+
/**
* Tests cache behavior in the presence of concurrent passivation.
*
* @author Brian Stansberry
- * @version $Revision: 1.9 $
+ * @version $Revision: 1.10 $
*/
public class ConcurrentEvictionTest extends TestCase
{
private CacheImpl cache_;
private int wakeupIntervalMillis_ = 0;
+ private String tmpDir = System.getProperty("java.io.tmpdir", "/tmp");
+ private String cacheLoaderDir = "/JBossCacheFileCacheLoader";
public ConcurrentEvictionTest(String s)
{
@@ -45,16 +50,19 @@
void initCaches() throws Exception
{
- TestingUtil.recursiveFileRemove("/tmp/JBossCacheFileCacheLoader");
+ TestingUtil.recursiveFileRemove(tmpDir + cacheLoaderDir);
cache_ = (CacheImpl) DefaultCacheFactory.getInstance().createCache("META-INF/local-eviction-cacheloader-service.xml", false);// read in generic local xml
cache_.getConfiguration().setTransactionManagerLookupClass("org.jboss.cache.transaction.DummyTransactionManagerLookup");
+ Properties p = new Properties();
+ p.put("location", tmpDir + cacheLoaderDir);
+ cache_.getConfiguration().getCacheLoaderConfig().getFirstCacheLoaderConfig().setProperties(p);
cache_.start();
}
public void tearDown() throws Exception
{
super.tearDown();
- TestingUtil.recursiveFileRemove("/tmp/JBossCacheFileCacheLoader");
+ TestingUtil.recursiveFileRemove(tmpDir + cacheLoaderDir);
cache_.stop();
cache_ = null;
}
More information about the jboss-cvs-commits
mailing list