aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cummi...@apache.org
Subject svn commit: r1351593 - in /aries/trunk: application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/ application/application-itests/src/test/java/org/ops4j/ application/application-itests/src/test/java/org/ops4j/pax/ applic...
Date Tue, 19 Jun 2012 07:59:29 GMT
Author: cumminsh
Date: Tue Jun 19 07:59:28 2012
New Revision: 1351593

URL: http://svn.apache.org/viewvc?rev=1351593&view=rev
Log:
[ARIES-827] Committing patch by David Jencks, along with tests which verify that composite-bundle
based application isolation works under Equinox 3.7

Added:
    aries/trunk/application/application-itests/src/test/java/org/ops4j/
    aries/trunk/application/application-itests/src/test/java/org/ops4j/pax/
    aries/trunk/application/application-itests/src/test/java/org/ops4j/pax/runner/
    aries/trunk/application/application-itests/src/test/java/org/ops4j/pax/runner/platform/
    aries/trunk/application/application-itests/src/test/java/org/ops4j/pax/runner/platform/equinox/
Modified:
    aries/trunk/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/BasicAppManagerTest.java
    aries/trunk/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/BasicNoOpResolverTest.java
    aries/trunk/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/IsolatedCfgAdminRuntimeTest.java
    aries/trunk/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/IsolatedRuntimeTest.java
    aries/trunk/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/MinimumImportsTest.java
    aries/trunk/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/OBRAppManagerTest.java
    aries/trunk/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/OBRResolverAdvancedTest.java
    aries/trunk/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/OBRResolverTest.java
    aries/trunk/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/UpdateAppTest.java
    aries/trunk/util/util-r42/src/main/java/org/apache/aries/util/tracker/InternalRecursiveBundleTracker.java
    aries/trunk/util/util/src/main/java/org/apache/aries/util/tracker/RecursiveBundleTracker.java
    aries/trunk/util/util/src/test/java/org/apache/aries/util/RecursiveBundleTrackerTest.java

Modified: aries/trunk/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/BasicAppManagerTest.java
URL: http://svn.apache.org/viewvc/aries/trunk/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/BasicAppManagerTest.java?rev=1351593&r1=1351592&r2=1351593&view=diff
==============================================================================
--- aries/trunk/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/BasicAppManagerTest.java
(original)
+++ aries/trunk/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/BasicAppManagerTest.java
Tue Jun 19 07:59:28 2012
@@ -38,6 +38,7 @@ import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.ops4j.pax.exam.Option;
+import org.ops4j.pax.exam.container.def.PaxRunnerOptions;
 import org.ops4j.pax.exam.junit.JUnit4TestRunner;
 
 @RunWith(JUnit4TestRunner.class)
@@ -140,8 +141,7 @@ public class BasicAppManagerTest extends
   }
 
   
-  @org.ops4j.pax.exam.junit.Configuration
-  public static Option[] configuration() {
+  private static Option[] generalConfiguration() {
     return testOptions(
         paxLogging("DEBUG"),
 
@@ -160,7 +160,7 @@ public class BasicAppManagerTest extends
         mavenBundle("org.apache.aries.blueprint", "org.apache.aries.blueprint"), 
         mavenBundle("org.ow2.asm", "asm-all"),
         mavenBundle("org.apache.aries.proxy", "org.apache.aries.proxy"),
-        mavenBundle("org.osgi", "org.osgi.compendium"),
+        mavenBundle("org.osgi", "org.osgi.compendium"));
         
         
         /* For debugging, uncomment the next two lines
@@ -172,6 +172,25 @@ public class BasicAppManagerTest extends
         import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.vmOption;
         */
 
-        equinox().version("3.5.0"));
   }
+
+  @org.ops4j.pax.exam.junit.Configuration
+  public static Option[] equinox35Options()
+  {
+	  return testOptions(
+			  generalConfiguration(),
+	          equinox().version("3.5.0")
+	          );
+  }
+
+  @org.ops4j.pax.exam.junit.Configuration
+  public static Option[] equinox37Options()
+  {
+	  return testOptions(
+			  generalConfiguration(),
+			  PaxRunnerOptions.rawPaxRunnerOption("config", "classpath:ss-runner.properties"),   
      
+	          equinox().version("3.7.0.v20110613")
+	          );
+  }
+
 }

Modified: aries/trunk/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/BasicNoOpResolverTest.java
URL: http://svn.apache.org/viewvc/aries/trunk/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/BasicNoOpResolverTest.java?rev=1351593&r1=1351592&r2=1351593&view=diff
==============================================================================
--- aries/trunk/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/BasicNoOpResolverTest.java
(original)
+++ aries/trunk/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/BasicNoOpResolverTest.java
Tue Jun 19 07:59:28 2012
@@ -37,6 +37,7 @@ import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.ops4j.pax.exam.Option;
+import org.ops4j.pax.exam.container.def.PaxRunnerOptions;
 import org.ops4j.pax.exam.junit.JUnit4TestRunner;
 
 @RunWith(JUnit4TestRunner.class)
@@ -115,8 +116,7 @@ public class BasicNoOpResolverTest exten
   }
 
   
-  @org.ops4j.pax.exam.junit.Configuration
-  public static Option[] configuration() {
+  private static Option[] generalConfiguration() {
     return testOptions(
         paxLogging("DEBUG"),
 
@@ -134,7 +134,7 @@ public class BasicNoOpResolverTest exten
         mavenBundle("org.apache.aries.blueprint", "org.apache.aries.blueprint"), 
         mavenBundle("org.ow2.asm", "asm-all"),
         mavenBundle("org.apache.aries.proxy", "org.apache.aries.proxy"),
-        mavenBundle("org.osgi", "org.osgi.compendium"),
+        mavenBundle("org.osgi", "org.osgi.compendium"));
         
         
         /* For debugging, uncomment the next two lines
@@ -146,6 +146,25 @@ public class BasicNoOpResolverTest exten
         import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.vmOption;
         */
 
-        equinox().version("3.5.0"));
   }
+
+  @org.ops4j.pax.exam.junit.Configuration
+  public static Option[] equinox35Options()
+  {
+	  return testOptions(
+			  generalConfiguration(),
+	          equinox().version("3.5.0")
+	          );
+  }
+
+  @org.ops4j.pax.exam.junit.Configuration
+  public static Option[] equinox37Options()
+  {
+	  return testOptions(
+			  generalConfiguration(),
+			  PaxRunnerOptions.rawPaxRunnerOption("config", "classpath:ss-runner.properties"),   
      
+	          equinox().version("3.7.0.v20110613")
+	          );
+  }
+
 }

Modified: aries/trunk/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/IsolatedCfgAdminRuntimeTest.java
URL: http://svn.apache.org/viewvc/aries/trunk/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/IsolatedCfgAdminRuntimeTest.java?rev=1351593&r1=1351592&r2=1351593&view=diff
==============================================================================
--- aries/trunk/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/IsolatedCfgAdminRuntimeTest.java
(original)
+++ aries/trunk/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/IsolatedCfgAdminRuntimeTest.java
Tue Jun 19 07:59:28 2012
@@ -57,6 +57,7 @@ import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.ops4j.pax.exam.Option;
+import org.ops4j.pax.exam.container.def.PaxRunnerOptions;
 import org.ops4j.pax.exam.junit.JUnit4TestRunner;
 import org.ops4j.pax.exam.options.MavenArtifactProvisionOption;
 import org.osgi.framework.BundleContext;
@@ -359,8 +360,7 @@ public class IsolatedCfgAdminRuntimeTest
      * @return the various required options
      * @throws Exception
      */
-    @org.ops4j.pax.exam.junit.Configuration
-    public static Option[] configuration() throws Exception {
+    private static Option[] generalConfiguration() throws Exception {
         return testOptions(
                 repository("http://repository.ops4j.org/maven2"),
                 paxLogging("DEBUG"),
@@ -384,9 +384,27 @@ public class IsolatedCfgAdminRuntimeTest
                 mavenBundle("org.apache.aries.application", "org.apache.aries.application.runtime.repository"),
                 mavenBundle("org.apache.felix", "org.apache.felix.configadmin"),
                 mavenBundle("org.apache.geronimo.specs", "geronimo-jta_1.1_spec"),
-                mavenBundle("org.ops4j.pax.url", "pax-url-mvn"),
+                mavenBundle("org.ops4j.pax.url", "pax-url-mvn"));
                 //vmOption("-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5006"),

-                equinox().version("3.5.0"));
+    }
+
+    @org.ops4j.pax.exam.junit.Configuration
+    public static Option[] equinox35Options() throws Exception
+    {
+  	  return testOptions(
+  			  generalConfiguration(),
+  	          equinox().version("3.5.0")
+  	          );
+    }
+
+    @org.ops4j.pax.exam.junit.Configuration
+    public static Option[] equinox37Options() throws Exception
+    {
+  	  return testOptions(
+  			  generalConfiguration(),
+  			  PaxRunnerOptions.rawPaxRunnerOption("config", "classpath:ss-runner.properties"), 
        
+  	          equinox().version("3.7.0.v20110613")
+  	          );
     }
 
     /**

Modified: aries/trunk/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/IsolatedRuntimeTest.java
URL: http://svn.apache.org/viewvc/aries/trunk/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/IsolatedRuntimeTest.java?rev=1351593&r1=1351592&r2=1351593&view=diff
==============================================================================
--- aries/trunk/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/IsolatedRuntimeTest.java
(original)
+++ aries/trunk/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/IsolatedRuntimeTest.java
Tue Jun 19 07:59:28 2012
@@ -50,6 +50,7 @@ import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.ops4j.pax.exam.Option;
+import org.ops4j.pax.exam.container.def.PaxRunnerOptions;
 import org.ops4j.pax.exam.junit.JUnit4TestRunner;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleEvent;
@@ -300,13 +301,12 @@ public class IsolatedRuntimeTest extends
   private void assertHelloWorldService(String appName, String message) throws Exception
   {
     HelloWorld hw = IsolationTestUtils.findHelloWorldService(bundleContext, appName);
-    assertNotNull(hw);
+    assertNotNull("The Hello World service could not be found.", hw);
     assertEquals(message, hw.getMessage());
   }
   
-  @org.ops4j.pax.exam.junit.Configuration
-  public static Option[] configuration() {
-    return testOptions(
+  private static Option[] generalConfiguration() {
+    return flatOptions(
         repository( "http://repository.ops4j.org/maven2" ),
         
         paxLogging("DEBUG"),
@@ -331,7 +331,7 @@ public class IsolatedRuntimeTest extends
         mavenBundle("org.apache.aries.application", "org.apache.aries.application.runtime.framework.management"),
         mavenBundle("org.apache.aries.application", "org.apache.aries.application.runtime.repository"),
         mavenBundle("org.osgi", "org.osgi.compendium"),
-        mavenBundle("org.apache.geronimo.specs","geronimo-jta_1.1_spec"),
+        mavenBundle("org.apache.geronimo.specs","geronimo-jta_1.1_spec")
 
         /* For debugging, uncommenting the following two lines and add the imports */
         /*
@@ -343,6 +343,26 @@ public class IsolatedRuntimeTest extends
         import static org.ops4j.pax.exam.CoreOptions.waitForFrameworkStartup;
         import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.vmOption;
          */
-        equinox().version("3.5.0"));
+          );
+  }
+  
+  @org.ops4j.pax.exam.junit.Configuration
+  public static Option[] equinox35Options()
+  {
+	  return testOptions(
+			  generalConfiguration(),
+	          equinox().version("3.5.0")
+	          );
   }
+
+  @org.ops4j.pax.exam.junit.Configuration
+  public static Option[] equinox37Options()
+  {
+	  return testOptions(
+			  generalConfiguration(),
+			  PaxRunnerOptions.rawPaxRunnerOption("config", "classpath:ss-runner.properties"),   
      
+	          equinox().version("3.7.0.v20110613")
+	          );
+  }
+
 }

Modified: aries/trunk/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/MinimumImportsTest.java
URL: http://svn.apache.org/viewvc/aries/trunk/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/MinimumImportsTest.java?rev=1351593&r1=1351592&r2=1351593&view=diff
==============================================================================
--- aries/trunk/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/MinimumImportsTest.java
(original)
+++ aries/trunk/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/MinimumImportsTest.java
Tue Jun 19 07:59:28 2012
@@ -43,6 +43,7 @@ import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.ops4j.pax.exam.Option;
+import org.ops4j.pax.exam.container.def.PaxRunnerOptions;
 import org.ops4j.pax.exam.junit.JUnit4TestRunner;
 import org.osgi.framework.Constants;
 import org.osgi.framework.ServiceRegistration;
@@ -164,8 +165,7 @@ public class MinimumImportsTest extends 
     sr.unregister();
   }
 
-  @org.ops4j.pax.exam.junit.Configuration
-  public static Option[] configuration() {
+  public static Option[] generalConfiguration() {
     return testOptions(
         paxLogging("DEBUG"),
 
@@ -184,7 +184,7 @@ public class MinimumImportsTest extends 
         mavenBundle("org.apache.aries.blueprint", "org.apache.aries.blueprint"), 
         mavenBundle("org.ow2.asm", "asm-all"),
         mavenBundle("org.apache.aries.proxy", "org.apache.aries.proxy"),
-        mavenBundle("org.osgi", "org.osgi.compendium"),
+        mavenBundle("org.osgi", "org.osgi.compendium")
 
         /* For debugging, uncomment the next two lines*/
         /*vmOption ("-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5007"),
@@ -195,6 +195,26 @@ public class MinimumImportsTest extends 
           import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.vmOption;*/
 
 
-        equinox().version("3.5.0"));
+        );
+  }
+  
+  @org.ops4j.pax.exam.junit.Configuration
+  public static Option[] equinox35Options()
+  {
+	  return testOptions(
+			  generalConfiguration(),
+	          equinox().version("3.5.0")
+	          );
   }
+
+  @org.ops4j.pax.exam.junit.Configuration
+  public static Option[] equinox37Options()
+  {
+	  return testOptions(
+			  generalConfiguration(),
+			  PaxRunnerOptions.rawPaxRunnerOption("config", "classpath:ss-runner.properties"),   
      
+	          equinox().version("3.7.0.v20110613")
+	          );
+  }
+
 }

Modified: aries/trunk/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/OBRAppManagerTest.java
URL: http://svn.apache.org/viewvc/aries/trunk/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/OBRAppManagerTest.java?rev=1351593&r1=1351592&r2=1351593&view=diff
==============================================================================
--- aries/trunk/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/OBRAppManagerTest.java
(original)
+++ aries/trunk/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/OBRAppManagerTest.java
Tue Jun 19 07:59:28 2012
@@ -44,6 +44,7 @@ import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.ops4j.pax.exam.Option;
+import org.ops4j.pax.exam.container.def.PaxRunnerOptions;
 import org.ops4j.pax.exam.junit.JUnit4TestRunner;
 
 @RunWith(JUnit4TestRunner.class)
@@ -146,8 +147,7 @@ public class OBRAppManagerTest extends A
 	    manager.uninstall(ctx);
 	  }
 
-  @org.ops4j.pax.exam.junit.Configuration
-  public static Option[] configuration() {
+  public static Option[] generalConfiguration() {
     return testOptions(
         paxLogging("DEBUG"),
 
@@ -167,7 +167,7 @@ public class OBRAppManagerTest extends A
         mavenBundle("org.apache.aries.application", "org.apache.aries.application.runtime"),
         mavenBundle("org.apache.aries.application", "org.apache.aries.application.runtime.itest.interfaces"),
 
-        mavenBundle("org.osgi", "org.osgi.compendium"),
+        mavenBundle("org.osgi", "org.osgi.compendium")
 
         //        /* For debugging, uncomment the next two lines
         //        vmOption ("-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005"),
@@ -179,6 +179,26 @@ public class OBRAppManagerTest extends A
         import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.vmOption;
          */
 
-        equinox().version("3.5.0"));
+        );
+  }
+  
+  @org.ops4j.pax.exam.junit.Configuration
+  public static Option[] equinox35Options()
+  {
+	  return testOptions(
+			  generalConfiguration(),
+	          equinox().version("3.5.0")
+	          );
+  }
+
+  @org.ops4j.pax.exam.junit.Configuration
+  public static Option[] equinox37Options()
+  {
+	  return testOptions(
+			  generalConfiguration(),
+			  PaxRunnerOptions.rawPaxRunnerOption("config", "classpath:ss-runner.properties"),   
      
+	          equinox().version("3.7.0.v20110613")
+	          );
   }
+
 }
\ No newline at end of file

Modified: aries/trunk/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/OBRResolverAdvancedTest.java
URL: http://svn.apache.org/viewvc/aries/trunk/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/OBRResolverAdvancedTest.java?rev=1351593&r1=1351592&r2=1351593&view=diff
==============================================================================
--- aries/trunk/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/OBRResolverAdvancedTest.java
(original)
+++ aries/trunk/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/OBRResolverAdvancedTest.java
Tue Jun 19 07:59:28 2012
@@ -66,6 +66,7 @@ import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.ops4j.pax.exam.Option;
+import org.ops4j.pax.exam.container.def.PaxRunnerOptions;
 import org.ops4j.pax.exam.junit.JUnit4TestRunner;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.Constants;
@@ -529,8 +530,7 @@ public class OBRResolverAdvancedTest ext
     }
   }
 
-  @org.ops4j.pax.exam.junit.Configuration
-  public static Option[] configuration() {
+  private static Option[] generalConfiguration() {
     return testOptions(
         paxLogging("DEBUG"),
         
@@ -549,7 +549,7 @@ public class OBRResolverAdvancedTest ext
         mavenBundle("org.apache.aries.blueprint", "org.apache.aries.blueprint"),
         mavenBundle("org.ow2.asm", "asm-all"),
         mavenBundle("org.apache.aries.proxy", "org.apache.aries.proxy"),
-        mavenBundle("org.osgi", "org.osgi.compendium"),
+        mavenBundle("org.osgi", "org.osgi.compendium")
 
         /* For debugging, uncomment the next two lines  */
         /*vmOption ("-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5010"),
@@ -560,6 +560,26 @@ public class OBRResolverAdvancedTest ext
         import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.vmOption;
         */
 
-        equinox().version("3.5.0"));
+        );
+  }
+  
+  @org.ops4j.pax.exam.junit.Configuration
+  public static Option[] equinox35Options()
+  {
+	  return testOptions(
+			  generalConfiguration(),
+	          equinox().version("3.5.0")
+	          );
+  }
+
+  @org.ops4j.pax.exam.junit.Configuration
+  public static Option[] equinox37Options()
+  {
+	  return testOptions(
+			  generalConfiguration(),
+			  PaxRunnerOptions.rawPaxRunnerOption("config", "classpath:ss-runner.properties"),   
      
+	          equinox().version("3.7.0.v20110613")
+	          );
   }
+
 }
\ No newline at end of file

Modified: aries/trunk/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/OBRResolverTest.java
URL: http://svn.apache.org/viewvc/aries/trunk/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/OBRResolverTest.java?rev=1351593&r1=1351592&r2=1351593&view=diff
==============================================================================
--- aries/trunk/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/OBRResolverTest.java
(original)
+++ aries/trunk/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/OBRResolverTest.java
Tue Jun 19 07:59:28 2012
@@ -65,6 +65,7 @@ import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.ops4j.pax.exam.Option;
+import org.ops4j.pax.exam.container.def.PaxRunnerOptions;
 import org.ops4j.pax.exam.junit.JUnit4TestRunner;
 import org.osgi.framework.Bundle;
 
@@ -314,8 +315,7 @@ public class OBRResolverTest extends Abs
     }
 
 
-  @org.ops4j.pax.exam.junit.Configuration
-  public static Option[] configuration() {
+  private static Option[] generalConfiguration() {
     return testOptions(
         paxLogging("DEBUG"),
         
@@ -334,7 +334,7 @@ public class OBRResolverTest extends Abs
         mavenBundle("org.apache.aries.application", "org.apache.aries.application.management"),
         mavenBundle("org.apache.aries.application", "org.apache.aries.application.runtime"),
         mavenBundle("org.apache.aries.application", "org.apache.aries.application.runtime.itest.interfaces"),
-        mavenBundle("org.osgi", "org.osgi.compendium"),
+        mavenBundle("org.osgi", "org.osgi.compendium")
 
         /* For debugging, uncomment the next two lines */
         // vmOption ("-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=7777"),
@@ -345,6 +345,26 @@ public class OBRResolverTest extends Abs
         import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.vmOption;
         */
 
-        equinox().version("3.5.0"));
+        );
+  }
+  
+  @org.ops4j.pax.exam.junit.Configuration
+  public static Option[] equinox35Options()
+  {
+	  return testOptions(
+			  generalConfiguration(),
+	          equinox().version("3.5.0")
+	          );
+  }
+
+  @org.ops4j.pax.exam.junit.Configuration
+  public static Option[] equinox37Options()
+  {
+	  return testOptions(
+			  generalConfiguration(),
+			  PaxRunnerOptions.rawPaxRunnerOption("config", "classpath:ss-runner.properties"),   
      
+	          equinox().version("3.7.0.v20110613")
+	          );
   }
+
 }
\ No newline at end of file

Modified: aries/trunk/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/UpdateAppTest.java
URL: http://svn.apache.org/viewvc/aries/trunk/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/UpdateAppTest.java?rev=1351593&r1=1351592&r2=1351593&view=diff
==============================================================================
--- aries/trunk/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/UpdateAppTest.java
(original)
+++ aries/trunk/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/UpdateAppTest.java
Tue Jun 19 07:59:28 2012
@@ -58,6 +58,7 @@ import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.ops4j.pax.exam.Option;
+import org.ops4j.pax.exam.container.def.PaxRunnerOptions;
 import org.ops4j.pax.exam.junit.JUnit4TestRunner;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleContext;
@@ -246,8 +247,7 @@ public class UpdateAppTest extends Abstr
     assertEquals(message, hw.getMessage());
   }
 
-  @org.ops4j.pax.exam.junit.Configuration
-  public static Option[] configuration() {
+  private static Option[] generalConfiguration() {
     return testOptions(
         paxLogging("DEBUG"),
         
@@ -273,7 +273,7 @@ public class UpdateAppTest extends Abstr
         mavenBundle("org.apache.aries.application", "org.apache.aries.application.runtime.repository"),
         mavenBundle("org.apache.aries.application", "org.apache.aries.application.runtime.isolated"),
         mavenBundle("org.osgi", "org.osgi.compendium"),
-        mavenBundle("org.apache.geronimo.specs","geronimo-jta_1.1_spec"),
+        mavenBundle("org.apache.geronimo.specs","geronimo-jta_1.1_spec")
 
         // new VMOption("-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5011"),
 
@@ -282,6 +282,26 @@ public class UpdateAppTest extends Abstr
         import static org.ops4j.pax.exam.CoreOptions.waitForFrameworkStartup;
         import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.vmOption;
          */
-        equinox().version("3.5.0"));
+        );
+  }
+  
+  @org.ops4j.pax.exam.junit.Configuration
+  public static Option[] equinox35Options()
+  {
+	  return testOptions(
+			  generalConfiguration(),
+	          equinox().version("3.5.0")
+	          );
   }
+
+  @org.ops4j.pax.exam.junit.Configuration
+  public static Option[] equinox37Options()
+  {
+	  return testOptions(
+			  generalConfiguration(),
+			  PaxRunnerOptions.rawPaxRunnerOption("config", "classpath:ss-runner.properties"),   
      
+	          equinox().version("3.7.0.v20110613")
+	          );
+  }
+
 }

Modified: aries/trunk/util/util-r42/src/main/java/org/apache/aries/util/tracker/InternalRecursiveBundleTracker.java
URL: http://svn.apache.org/viewvc/aries/trunk/util/util-r42/src/main/java/org/apache/aries/util/tracker/InternalRecursiveBundleTracker.java?rev=1351593&r1=1351592&r2=1351593&view=diff
==============================================================================
--- aries/trunk/util/util-r42/src/main/java/org/apache/aries/util/tracker/InternalRecursiveBundleTracker.java
(original)
+++ aries/trunk/util/util-r42/src/main/java/org/apache/aries/util/tracker/InternalRecursiveBundleTracker.java
Tue Jun 19 07:59:28 2012
@@ -44,12 +44,15 @@ public class InternalRecursiveBundleTrac
 
   private final BundleTrackerCustomizer customizer;
 
+  private final boolean nested;
+
   public InternalRecursiveBundleTracker(BundleContext context, int stateMask,
-      BundleTrackerCustomizer customizer)
+      BundleTrackerCustomizer customizer, boolean nested)
   {
     super(context, stateMask, null);
     mask = stateMask;
     this.customizer = customizer;
+    this.nested = nested;
   }
 
   /*
@@ -64,7 +67,7 @@ public class InternalRecursiveBundleTrac
     if (b instanceof CompositeBundle) {
       customizedProcessBundle(this, b, event, false);
       o = b;
-    } else {
+    } else if (nested) {
       // Delegate to our customizer for normal bundles
       if (customizer != null) {
         o = customizer.addingBundle(b, event);
@@ -154,7 +157,7 @@ public class InternalRecursiveBundleTrac
 
       // let's track each of the bundle in the CompositeBundle
       BundleTracker bt = new InternalRecursiveBundleTracker(compositeBundleContext, stateMask,
-          customizer);
+          customizer, true);
       bt.open();
       BundleTrackerFactory.registerBundleTracker(bundleScope, bt);
     }

Modified: aries/trunk/util/util/src/main/java/org/apache/aries/util/tracker/RecursiveBundleTracker.java
URL: http://svn.apache.org/viewvc/aries/trunk/util/util/src/main/java/org/apache/aries/util/tracker/RecursiveBundleTracker.java?rev=1351593&r1=1351592&r2=1351593&view=diff
==============================================================================
--- aries/trunk/util/util/src/main/java/org/apache/aries/util/tracker/RecursiveBundleTracker.java
(original)
+++ aries/trunk/util/util/src/main/java/org/apache/aries/util/tracker/RecursiveBundleTracker.java
Tue Jun 19 07:59:28 2012
@@ -42,6 +42,7 @@ public final class RecursiveBundleTracke
             Bundle.INSTALLED | Bundle.RESOLVED | Bundle.STARTING | Bundle.ACTIVE | Bundle.STOPPING;
 
     private final BundleTracker tracker;
+    private final BundleTracker compositeTracker;
 
     /**
      * Constructor
@@ -54,6 +55,7 @@ public final class RecursiveBundleTracke
      *                                  flags
      */
     public RecursiveBundleTracker(BundleContext context, int stateMask, BundleTrackerCustomizer
customizer) {
+        //This test only makes sense for composite bundles, but in the interests of more
consistent behavior lets leave it.
         // We always need INSTALLED events so we can recursively listen to the frameworks
         if ((stateMask & COMPOSITE_BUNDLE_MASK) != COMPOSITE_BUNDLE_MASK)
             throw new IllegalArgumentException();
@@ -63,14 +65,14 @@ public final class RecursiveBundleTracke
             tracker = new BundleHookBundleTracker(context, stateMask, customizer);
         } catch (Throwable e) {
         }
-        if (tracker == null) {
-            if (areMultipleFrameworksAvailable(context)) {
-                //not sure if this ever happens, non R43 composite bundles
-                tracker = new InternalRecursiveBundleTracker(context, stateMask, customizer);
-            } else {
-                //R42
-                tracker = new BundleTracker(context, stateMask, customizer);
-            }
+        if (areMultipleFrameworksAvailable(context)) {
+            compositeTracker = new InternalRecursiveBundleTracker(context, stateMask, customizer,
tracker == null);
+        } else {
+            compositeTracker = null;
+        }
+        if (tracker == null && compositeTracker == null) {
+            //R42
+            tracker = new BundleTracker(context, stateMask, customizer);
         }
         this.tracker = tracker;
     }
@@ -86,7 +88,12 @@ public final class RecursiveBundleTracke
      * @see BundleTracker#open()
      */
     public void open() {
-        tracker.open();
+        if (tracker != null) {
+            tracker.open();
+        }
+        if (compositeTracker != null) {
+            compositeTracker.open();
+        }
     }
 
     /**
@@ -95,7 +102,12 @@ public final class RecursiveBundleTracke
      * @see BundleTracker#close()
      */
     public void close() {
-        tracker.close();
+        if (tracker != null) {
+            tracker.close();
+        }
+        if (compositeTracker != null) {
+            compositeTracker.close();
+        }
     }
 
 }

Modified: aries/trunk/util/util/src/test/java/org/apache/aries/util/RecursiveBundleTrackerTest.java
URL: http://svn.apache.org/viewvc/aries/trunk/util/util/src/test/java/org/apache/aries/util/RecursiveBundleTrackerTest.java?rev=1351593&r1=1351592&r2=1351593&view=diff
==============================================================================
--- aries/trunk/util/util/src/test/java/org/apache/aries/util/RecursiveBundleTrackerTest.java
(original)
+++ aries/trunk/util/util/src/test/java/org/apache/aries/util/RecursiveBundleTrackerTest.java
Tue Jun 19 07:59:28 2012
@@ -118,7 +118,7 @@ public class RecursiveBundleTrackerTest 
         BundleTrackerCustomizer customizer = Skeleton.newMock(BundleTrackerCustomizer.class);
 
         sut = new InternalRecursiveBundleTracker(context, 
-                Bundle.INSTALLED | Bundle.STARTING | Bundle.ACTIVE | Bundle.STOPPING, customizer);
+                Bundle.INSTALLED | Bundle.STARTING | Bundle.ACTIVE | Bundle.STOPPING, customizer,
true);
         
         sut.open();
     }



Mime
View raw message