activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r387663 - in /incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/kaha: ListContainerTest.java MapContainerTest.java StoreTest.java
Date Tue, 21 Mar 2006 23:14:26 GMT
Author: chirino
Date: Tue Mar 21 15:14:22 2006
New Revision: 387663

URL: http://svn.apache.org/viewcvs?rev=387663&view=rev
Log:
these tests were failing on windows where File.delete fails if the file is still open.

Modified:
    incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/ListContainerTest.java
    incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/MapContainerTest.java
    incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/StoreTest.java

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/ListContainerTest.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/ListContainerTest.java?rev=387663&r1=387662&r2=387663&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/ListContainerTest.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/ListContainerTest.java
Tue Mar 21 15:14:22 2006
@@ -1,15 +1,11 @@
 package org.apache.activemq.kaha;
 
 import java.io.IOException;
-import java.util.HashMap;
 import java.util.Iterator;
 import java.util.LinkedList;
 import java.util.List;
 import java.util.ListIterator;
-import java.util.Map;
-import org.apache.activemq.kaha.ListContainer;
-import org.apache.activemq.kaha.Store;
-import org.apache.activemq.kaha.StoreFactory;
+
 import junit.framework.TestCase;
 
 public class ListContainerTest extends TestCase{
@@ -310,6 +306,9 @@
 
     protected void tearDown() throws Exception{
         super.tearDown();
+        if( store!= null ) {
+        	store.close();
+        }
         assertTrue(StoreFactory.delete(name));
     }
 }

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/MapContainerTest.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/MapContainerTest.java?rev=387663&r1=387662&r2=387663&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/MapContainerTest.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/MapContainerTest.java
Tue Mar 21 15:14:22 2006
@@ -173,6 +173,10 @@
 
     protected void tearDown() throws Exception{
         super.tearDown();
+        if( store != null ) {
+        	store.close();
+        	store=null;
+        }
         assertTrue(StoreFactory.delete(name));
     }
     

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/StoreTest.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/StoreTest.java?rev=387663&r1=387662&r2=387663&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/StoreTest.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/StoreTest.java
Tue Mar 21 15:14:22 2006
@@ -203,6 +203,11 @@
 
     protected void tearDown() throws Exception{
         super.tearDown();
-        assertTrue(StoreFactory.delete(name));
+        if( store!=null ) {
+        	store.close();
+        	store=null;
+        }
+        boolean rc = StoreFactory.delete(name);
+        assertTrue(rc);
     }
 }



Mime
View raw message