You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by na...@apache.org on 2010/07/01 13:25:25 UTC
svn commit: r959617 - in
/tuscany/sca-java-1.x/trunk/itest/osgi-implementation: pom.xml
src/test/java/util/OSGiTestUtil.java
Author: nash
Date: Thu Jul 1 11:25:25 2010
New Revision: 959617
URL: http://svn.apache.org/viewvc?rev=959617&view=rev
Log:
Delete OSGI bundle cache before running a new test (TUSCANY-3615)
Modified:
tuscany/sca-java-1.x/trunk/itest/osgi-implementation/pom.xml
tuscany/sca-java-1.x/trunk/itest/osgi-implementation/src/test/java/util/OSGiTestUtil.java
Modified: tuscany/sca-java-1.x/trunk/itest/osgi-implementation/pom.xml
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/itest/osgi-implementation/pom.xml?rev=959617&r1=959616&r2=959617&view=diff
==============================================================================
--- tuscany/sca-java-1.x/trunk/itest/osgi-implementation/pom.xml (original)
+++ tuscany/sca-java-1.x/trunk/itest/osgi-implementation/pom.xml Thu Jul 1 11:25:25 2010
@@ -145,6 +145,12 @@
</dependency>
<dependency>
+ <groupId>commons-io</groupId>
+ <artifactId>commons-io</artifactId>
+ <version>1.4</version>
+ </dependency>
+
+ <dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.5</version>
@@ -198,6 +204,14 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <forkMode>pertest</forkMode>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.1</version>
Modified: tuscany/sca-java-1.x/trunk/itest/osgi-implementation/src/test/java/util/OSGiTestUtil.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/itest/osgi-implementation/src/test/java/util/OSGiTestUtil.java?rev=959617&r1=959616&r2=959617&view=diff
==============================================================================
--- tuscany/sca-java-1.x/trunk/itest/osgi-implementation/src/test/java/util/OSGiTestUtil.java (original)
+++ tuscany/sca-java-1.x/trunk/itest/osgi-implementation/src/test/java/util/OSGiTestUtil.java Thu Jul 1 11:25:25 2010
@@ -18,6 +18,9 @@
*/
package util;
+import java.io.File;
+import org.apache.commons.io.FileUtils;
+
import org.apache.tuscany.sca.osgi.runtime.OSGiRuntime;
@@ -37,6 +40,12 @@ public class OSGiTestUtil {
String felixConfigFileName = "file:target/test-classes/osgi/felix/felix.config.properties";
System.setProperty("felix.config.properties", felixConfigFileName);
+
+ // delete any cached OSGI bundles left over from previous test executions
+ File felixCache = new File("target/.felix");
+ if (felixCache.exists()) {
+ FileUtils.cleanDirectory(felixCache);
+ }
try {