You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by cl...@apache.org on 2013/02/22 18:52:57 UTC

svn commit: r1449149 - in /felix/trunk/ipojo/runtime/core-it/src/it: ipojo-core-bad-configuration-test/ ipojo-core-handler-test/src/test/java/org/apache/felix/ipojo/runtime/core/

Author: clement
Date: Fri Feb 22 17:52:57 2013
New Revision: 1449149

URL: http://svn.apache.org/r1449149
Log:
Felix-3903 - Set svn:ignore

Modified:
    felix/trunk/ipojo/runtime/core-it/src/it/ipojo-core-bad-configuration-test/   (props changed)
    felix/trunk/ipojo/runtime/core-it/src/it/ipojo-core-handler-test/src/test/java/org/apache/felix/ipojo/runtime/core/Common.java
    felix/trunk/ipojo/runtime/core-it/src/it/ipojo-core-handler-test/src/test/java/org/apache/felix/ipojo/runtime/core/DummyHandlerTest.java

Propchange: felix/trunk/ipojo/runtime/core-it/src/it/ipojo-core-bad-configuration-test/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Fri Feb 22 17:52:57 2013
@@ -0,0 +1,3 @@
+.idea
+target
+*.iml

Modified: felix/trunk/ipojo/runtime/core-it/src/it/ipojo-core-handler-test/src/test/java/org/apache/felix/ipojo/runtime/core/Common.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/runtime/core-it/src/it/ipojo-core-handler-test/src/test/java/org/apache/felix/ipojo/runtime/core/Common.java?rev=1449149&r1=1449148&r2=1449149&view=diff
==============================================================================
--- felix/trunk/ipojo/runtime/core-it/src/it/ipojo-core-handler-test/src/test/java/org/apache/felix/ipojo/runtime/core/Common.java (original)
+++ felix/trunk/ipojo/runtime/core-it/src/it/ipojo-core-handler-test/src/test/java/org/apache/felix/ipojo/runtime/core/Common.java Fri Feb 22 17:52:57 2013
@@ -56,6 +56,7 @@ public class Common {
         root.setLevel(Level.INFO);
 
         return options(
+                cleanCaches(),
                 ipojoBundles(),
                 junitAndMockitoBundles(),
                 // No tested bundle in this project
@@ -69,18 +70,19 @@ public class Common {
                 repository("http://repository.springsource.com/maven/bundles/external").id(
                         "com.springsource.repository.bundles.external"),
 
-                // Mockito without Hamcrest and Objenesis
-                mavenBundle("org.mockito", "mockito-core", "1.9.5"),
-
                 // Hamcrest with a version matching the range expected by Mockito
                 mavenBundle("org.hamcrest", "com.springsource.org.hamcrest.core", "1.1.0"),
 
+                // Mockito core does not includes Hamcrest
+                mavenBundle("org.mockito", "mockito-core", "1.9.5"),
+
                 // Objenesis with a version matching the range expected by Mockito
                 wrappedBundle(mavenBundle("org.objenesis", "objenesis", "1.2"))
                         .exports("*;version=1.2"),
 
                 // The default JUnit bundle also exports Hamcrest, but with an (incorrect) version of
-                // 4.9 which does not match the Mockito import.
+                // 4.9 which does not match the Mockito import. When deployed after the hamcrest bundles, it gets
+                // resolved correctly.
                 CoreOptions.junitBundles(),
 
                 /*
@@ -94,7 +96,7 @@ public class Common {
                  * org/mockito/cglib/proxy/Factory have different Class objects for the type org/mockito/cglib/
                  * proxy/Callback used in the signature
                  *
-                 * So we disable the bootdelegation.
+                 * So we disable the bootdelegation. this property has no effect on the other OSGi implementation.
                  */
                 frameworkProperty("felix.bootdelegation.implicit").value("false")
         );
@@ -157,7 +159,7 @@ public class Common {
         osgiHelper.dispose();
     }
 
-    public CompositeOption ipojoBundles() {
+    public static CompositeOption ipojoBundles() {
         return new DefaultCompositeOption(
                 mavenBundle("org.apache.felix", "org.apache.felix.ipojo").versionAsInProject(),
                 mavenBundle("org.ow2.chameleon.testing", "osgi-helpers").versionAsInProject(),

Modified: felix/trunk/ipojo/runtime/core-it/src/it/ipojo-core-handler-test/src/test/java/org/apache/felix/ipojo/runtime/core/DummyHandlerTest.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/runtime/core-it/src/it/ipojo-core-handler-test/src/test/java/org/apache/felix/ipojo/runtime/core/DummyHandlerTest.java?rev=1449149&r1=1449148&r2=1449149&view=diff
==============================================================================
--- felix/trunk/ipojo/runtime/core-it/src/it/ipojo-core-handler-test/src/test/java/org/apache/felix/ipojo/runtime/core/DummyHandlerTest.java (original)
+++ felix/trunk/ipojo/runtime/core-it/src/it/ipojo-core-handler-test/src/test/java/org/apache/felix/ipojo/runtime/core/DummyHandlerTest.java Fri Feb 22 17:52:57 2013
@@ -14,6 +14,7 @@ import org.ops4j.pax.exam.OptionUtils;
 import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
 import org.ops4j.pax.exam.spi.reactors.PerMethod;
 import org.ops4j.pax.tinybundles.core.TinyBundles;
+import org.osgi.framework.Constants;
 import org.osgi.framework.ServiceRegistration;
 import org.osgi.service.useradmin.User;
 import org.ow2.chameleon.testing.tinybundles.ipojo.IPOJOStrategy;
@@ -28,6 +29,8 @@ import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.verify;
 import static org.ops4j.pax.exam.CoreOptions.bundle;
 import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
+import static org.ops4j.pax.exam.CoreOptions.streamBundle;
+import static org.ops4j.pax.tinybundles.core.TinyBundles.withBnd;
 
 
 @ExamReactorStrategy(PerMethod.class)
@@ -58,16 +61,19 @@ public class DummyHandlerTest extends Co
         File dummyJar = new File("target/bundles/dummy.jar");
         FileUtils.copyInputStreamToFile(
                 TinyBundles.bundle()
-                        .add(Dummy.class)
                         .add(DummyImpl.class)
-                        .set(org.osgi.framework.Constants.EXPORT_PACKAGE, "org.apache.felix.ipojo.runtime.core" +
-                                ".services")
                         .set(org.osgi.framework.Constants.BUNDLE_SYMBOLICNAME, "Dummy.Bundle")
                         .build(IPOJOStrategy.withiPOJO(new File("src/main/resources/dummy-component.xml"))),
                 dummyJar);
 
 
         return OptionUtils.combine(options,
+                streamBundle(TinyBundles.bundle()
+                        .add(Dummy.class)
+                        .set(Constants.EXPORT_PACKAGE, "org.apache.felix.ipojo.runtime.core.services")
+                        .set(Constants.BUNDLE_SYMBOLICNAME, "service")
+                        .build(withBnd())
+                ),
                 bundle(handlerJar.toURI().toURL().toExternalForm()),
                 bundle(dummyJar.toURI().toURL().toExternalForm()),
                 mavenBundle().groupId("org.apache.felix").artifactId("org.osgi.compendium").version("1.4.0"));