[jboss-cvs] JBossCache/tests/functional/org/jboss/cache/passivation ...
Manik Surtani
msurtani at jboss.com
Tue Oct 31 12:35:31 EST 2006
User: msurtani
Date: 06/10/31 12:35:31
Modified: tests/functional/org/jboss/cache/passivation Tag:
Branch_JBossCache_1_4_0
ConcurrentPassivationTest.java
Log:
Updated
Revision Changes Path
No revision
No revision
1.1.2.2 +24 -9 JBossCache/tests/functional/org/jboss/cache/passivation/ConcurrentPassivationTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: ConcurrentPassivationTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/passivation/ConcurrentPassivationTest.java,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -b -r1.1.2.1 -r1.1.2.2
--- ConcurrentPassivationTest.java 25 Oct 2006 22:35:09 -0000 1.1.2.1
+++ ConcurrentPassivationTest.java 31 Oct 2006 17:35:31 -0000 1.1.2.2
@@ -10,16 +10,17 @@
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
-
import org.jboss.cache.Fqn;
import org.jboss.cache.PropertyConfigurator;
import org.jboss.cache.TreeCache;
+import java.io.File;
+
/**
* Tests cache behavior in the presence of concurrent passivation.
*
* @author Brian Stansberry
- * @version $Revision: 1.1.2.1 $
+ * @version $Revision: 1.1.2.2 $
*/
public class ConcurrentPassivationTest extends TestCase
{
@@ -43,6 +44,7 @@
void initCaches() throws Exception
{
+ removeStaleFiles();
cache_ = new TreeCache();
PropertyConfigurator config = new PropertyConfigurator();
config.configure(cache_, "META-INF/local-passivation-service.xml"); // read in generic local xml
@@ -53,7 +55,20 @@
public void tearDown() throws Exception
{
super.tearDown();
- cache_.stopService();
+ removeStaleFiles();
+ cache_.stop();
+ cache_ = null;
+ }
+
+ private void removeStaleFiles()
+ {
+ File file = new File("/tmp/JBossCacheFileCacheLoader");
+ if (file.exists())
+ {
+ System.out.println("Deleting file " + file);
+ file.deleteOnExit();
+ System.out.println(file.delete());
+ }
}
public void testConcurrentPassivation() throws Exception
More information about the jboss-cvs-commits
mailing list