tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject svn commit: r1196872 - in /openejb/trunk/openejb/assembly/tomee/tomee-embedded: pom.xml src/test/java/org/apache/tomee/embedded/EmbeddedTomEEContainerTest.java
Date Wed, 02 Nov 2011 23:47:46 GMT
Author: rmannibucau
Date: Wed Nov  2 23:47:45 2011
New Revision: 1196872

URL: http://svn.apache.org/viewvc?rev=1196872&view=rev
Log:
ensuring temp webapp created in tomee embedded test is deleted

Modified:
    openejb/trunk/openejb/assembly/tomee/tomee-embedded/pom.xml
    openejb/trunk/openejb/assembly/tomee/tomee-embedded/src/test/java/org/apache/tomee/embedded/EmbeddedTomEEContainerTest.java

Modified: openejb/trunk/openejb/assembly/tomee/tomee-embedded/pom.xml
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/assembly/tomee/tomee-embedded/pom.xml?rev=1196872&r1=1196871&r2=1196872&view=diff
==============================================================================
--- openejb/trunk/openejb/assembly/tomee/tomee-embedded/pom.xml (original)
+++ openejb/trunk/openejb/assembly/tomee/tomee-embedded/pom.xml Wed Nov  2 23:47:45 2011
@@ -188,6 +188,13 @@
       <artifactId>tomee-catalina</artifactId>
       <version>4.0.0-beta-2-SNAPSHOT</version>
     </dependency>
+
+    <dependency>
+      <groupId>commons-io</groupId>
+      <artifactId>commons-io</artifactId>
+      <version>2.0.1</version>
+      <scope>test</scope>
+    </dependency>
   </dependencies>
 </project>
 

Modified: openejb/trunk/openejb/assembly/tomee/tomee-embedded/src/test/java/org/apache/tomee/embedded/EmbeddedTomEEContainerTest.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/assembly/tomee/tomee-embedded/src/test/java/org/apache/tomee/embedded/EmbeddedTomEEContainerTest.java?rev=1196872&r1=1196871&r2=1196872&view=diff
==============================================================================
--- openejb/trunk/openejb/assembly/tomee/tomee-embedded/src/test/java/org/apache/tomee/embedded/EmbeddedTomEEContainerTest.java
(original)
+++ openejb/trunk/openejb/assembly/tomee/tomee-embedded/src/test/java/org/apache/tomee/embedded/EmbeddedTomEEContainerTest.java
Wed Nov  2 23:47:45 2011
@@ -1,5 +1,6 @@
 package org.apache.tomee.embedded;
 
+import org.apache.commons.io.FileUtils;
 import org.apache.openejb.OpenEjbContainer;
 import org.apache.openejb.util.IOUtils;
 import org.junit.Test;
@@ -40,8 +41,10 @@ public class EmbeddedTomEEContainerTest 
             assertEquals("true", IOUtils.readProperties(url).getProperty("ok"));
             container.close();
         } finally {
-            if (!war.delete()) {
-                war.deleteOnExit();
+            try {
+                FileUtils.forceDelete(war);
+            } catch (IOException e) {
+                FileUtils.deleteQuietly(war);
             }
         }
     }



Mime
View raw message