felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pde...@apache.org
Subject svn commit: r1532237 [2/2] - in /felix/trunk/dependencymanager/test2/src/test/java/org/apache/felix/dependencymanager/test2/integration: annotations/ api/ common/
Date Tue, 15 Oct 2013 07:51:11 GMT
Modified: felix/trunk/dependencymanager/test2/src/test/java/org/apache/felix/dependencymanager/test2/integration/api/ResourceDependencyTest.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/test2/src/test/java/org/apache/felix/dependencymanager/test2/integration/api/ResourceDependencyTest.java?rev=1532237&r1=1532236&r2=1532237&view=diff
==============================================================================
--- felix/trunk/dependencymanager/test2/src/test/java/org/apache/felix/dependencymanager/test2/integration/api/ResourceDependencyTest.java
(original)
+++ felix/trunk/dependencymanager/test2/src/test/java/org/apache/felix/dependencymanager/test2/integration/api/ResourceDependencyTest.java
Tue Oct 15 07:51:10 2013
@@ -18,10 +18,6 @@
  */
 package org.apache.felix.dependencymanager.test2.integration.api;
 
-import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
-import static org.ops4j.pax.exam.CoreOptions.options;
-import static org.ops4j.pax.exam.CoreOptions.provision;
-
 import java.lang.reflect.InvocationHandler;
 import java.lang.reflect.Method;
 import java.lang.reflect.Proxy;
@@ -33,24 +29,20 @@ import java.util.Map.Entry;
 
 import junit.framework.Assert;
 
+import org.apache.felix.dependencymanager.test2.components.Ensure;
+import org.apache.felix.dependencymanager.test2.integration.common.TestBase;
 import org.apache.felix.dm.Component;
 import org.apache.felix.dm.DependencyManager;
 import org.apache.felix.dm.ResourceHandler;
 import org.apache.felix.dm.ResourceUtil;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.ops4j.pax.exam.Option;
-import org.ops4j.pax.exam.junit.Configuration;
-import org.ops4j.pax.exam.junit.JUnit4TestRunner;
+import org.ops4j.pax.exam.junit.PaxExam;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.Filter;
 import org.osgi.framework.InvalidSyntaxException;
 import org.osgi.framework.ServiceReference;
 
-import org.ops4j.pax.exam.junit.PaxExam;
-import org.apache.felix.dependencymanager.test2.components.Ensure;
-import org.apache.felix.dependencymanager.test2.integration.common.TestBase;
-
 @RunWith(PaxExam.class)
 public class ResourceDependencyTest extends TestBase {
     @Test

Modified: felix/trunk/dependencymanager/test2/src/test/java/org/apache/felix/dependencymanager/test2/integration/api/ServiceDependencyComponentLifeCycleTest.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/test2/src/test/java/org/apache/felix/dependencymanager/test2/integration/api/ServiceDependencyComponentLifeCycleTest.java?rev=1532237&r1=1532236&r2=1532237&view=diff
==============================================================================
--- felix/trunk/dependencymanager/test2/src/test/java/org/apache/felix/dependencymanager/test2/integration/api/ServiceDependencyComponentLifeCycleTest.java
(original)
+++ felix/trunk/dependencymanager/test2/src/test/java/org/apache/felix/dependencymanager/test2/integration/api/ServiceDependencyComponentLifeCycleTest.java
Tue Oct 15 07:51:10 2013
@@ -20,26 +20,17 @@ package org.apache.felix.dependencymanag
 //import static org.ops4j.pax.exam.CoreOptions.waitForFrameworkStartupFor;
 //import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.vmOption;
 
-import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
-import static org.ops4j.pax.exam.CoreOptions.options;
-import static org.ops4j.pax.exam.CoreOptions.provision;
 import junit.framework.Assert;
 
+import org.apache.felix.dependencymanager.test2.components.Ensure;
+import org.apache.felix.dependencymanager.test2.integration.common.TestBase;
 import org.apache.felix.dm.Component;
 import org.apache.felix.dm.DependencyManager;
 import org.apache.felix.dm.ServiceDependency;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.ops4j.pax.exam.Option;
-import org.ops4j.pax.exam.junit.Configuration;
-import org.ops4j.pax.exam.junit.JUnit4TestRunner;
-import org.osgi.framework.BundleContext;
-import org.osgi.util.tracker.ServiceTracker;
-
-
 import org.ops4j.pax.exam.junit.PaxExam;
-import org.apache.felix.dependencymanager.test2.components.Ensure;
-import org.apache.felix.dependencymanager.test2.integration.common.TestBase;
+import org.osgi.util.tracker.ServiceTracker;
 
 @RunWith(PaxExam.class)
 public class ServiceDependencyComponentLifeCycleTest extends TestBase {

Modified: felix/trunk/dependencymanager/test2/src/test/java/org/apache/felix/dependencymanager/test2/integration/api/ServiceDependencyInjectionTest.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/test2/src/test/java/org/apache/felix/dependencymanager/test2/integration/api/ServiceDependencyInjectionTest.java?rev=1532237&r1=1532236&r2=1532237&view=diff
==============================================================================
--- felix/trunk/dependencymanager/test2/src/test/java/org/apache/felix/dependencymanager/test2/integration/api/ServiceDependencyInjectionTest.java
(original)
+++ felix/trunk/dependencymanager/test2/src/test/java/org/apache/felix/dependencymanager/test2/integration/api/ServiceDependencyInjectionTest.java
Tue Oct 15 07:51:10 2013
@@ -18,23 +18,15 @@
  */
 package org.apache.felix.dependencymanager.test2.integration.api;
 
-import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
-import static org.ops4j.pax.exam.CoreOptions.options;
-import static org.ops4j.pax.exam.CoreOptions.provision;
 import junit.framework.Assert;
 
+import org.apache.felix.dependencymanager.test2.components.Ensure;
+import org.apache.felix.dependencymanager.test2.integration.common.TestBase;
 import org.apache.felix.dm.Component;
 import org.apache.felix.dm.DependencyManager;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.ops4j.pax.exam.Option;
-import org.ops4j.pax.exam.junit.Configuration;
-import org.ops4j.pax.exam.junit.JUnit4TestRunner;
-import org.osgi.framework.BundleContext;
-
 import org.ops4j.pax.exam.junit.PaxExam;
-import org.apache.felix.dependencymanager.test2.components.Ensure;
-import org.apache.felix.dependencymanager.test2.integration.common.TestBase;
 
 @RunWith(PaxExam.class)
 public class ServiceDependencyInjectionTest extends TestBase {

Modified: felix/trunk/dependencymanager/test2/src/test/java/org/apache/felix/dependencymanager/test2/integration/api/ServiceDependencyPropagateTest.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/test2/src/test/java/org/apache/felix/dependencymanager/test2/integration/api/ServiceDependencyPropagateTest.java?rev=1532237&r1=1532236&r2=1532237&view=diff
==============================================================================
--- felix/trunk/dependencymanager/test2/src/test/java/org/apache/felix/dependencymanager/test2/integration/api/ServiceDependencyPropagateTest.java
(original)
+++ felix/trunk/dependencymanager/test2/src/test/java/org/apache/felix/dependencymanager/test2/integration/api/ServiceDependencyPropagateTest.java
Tue Oct 15 07:51:10 2013
@@ -18,27 +18,18 @@
  */
 package org.apache.felix.dependencymanager.test2.integration.api;
 
-import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
-import static org.ops4j.pax.exam.CoreOptions.options;
-import static org.ops4j.pax.exam.CoreOptions.provision;
-
 import java.util.Dictionary;
 import java.util.Hashtable;
 import java.util.Map;
 
+import org.apache.felix.dependencymanager.test2.components.Ensure;
+import org.apache.felix.dependencymanager.test2.integration.common.TestBase;
 import org.apache.felix.dm.Component;
 import org.apache.felix.dm.DependencyManager;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.ops4j.pax.exam.Option;
-import org.ops4j.pax.exam.junit.Configuration;
-import org.ops4j.pax.exam.junit.JUnit4TestRunner;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceReference;
-
 import org.ops4j.pax.exam.junit.PaxExam;
-import org.apache.felix.dependencymanager.test2.components.Ensure;
-import org.apache.felix.dependencymanager.test2.integration.common.TestBase;
+import org.osgi.framework.ServiceReference;
 
 /**
  * Validates ServiceDependency service properties propagation.

Modified: felix/trunk/dependencymanager/test2/src/test/java/org/apache/felix/dependencymanager/test2/integration/api/ServiceDependencyTest.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/test2/src/test/java/org/apache/felix/dependencymanager/test2/integration/api/ServiceDependencyTest.java?rev=1532237&r1=1532236&r2=1532237&view=diff
==============================================================================
--- felix/trunk/dependencymanager/test2/src/test/java/org/apache/felix/dependencymanager/test2/integration/api/ServiceDependencyTest.java
(original)
+++ felix/trunk/dependencymanager/test2/src/test/java/org/apache/felix/dependencymanager/test2/integration/api/ServiceDependencyTest.java
Tue Oct 15 07:51:10 2013
@@ -18,22 +18,13 @@
  */
 package org.apache.felix.dependencymanager.test2.integration.api;
 
-import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
-import static org.ops4j.pax.exam.CoreOptions.options;
-import static org.ops4j.pax.exam.CoreOptions.provision;
-
+import org.apache.felix.dependencymanager.test2.components.Ensure;
+import org.apache.felix.dependencymanager.test2.integration.common.TestBase;
 import org.apache.felix.dm.Component;
 import org.apache.felix.dm.DependencyManager;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.ops4j.pax.exam.Option;
-import org.ops4j.pax.exam.junit.Configuration;
-import org.ops4j.pax.exam.junit.JUnit4TestRunner;
-import org.osgi.framework.BundleContext;
-
 import org.ops4j.pax.exam.junit.PaxExam;
-import org.apache.felix.dependencymanager.test2.components.Ensure;
-import org.apache.felix.dependencymanager.test2.integration.common.TestBase;
 
 @RunWith(PaxExam.class)
 public class ServiceDependencyTest extends TestBase {

Modified: felix/trunk/dependencymanager/test2/src/test/java/org/apache/felix/dependencymanager/test2/integration/api/ServiceDependencyThroughCallbackInstanceTest.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/test2/src/test/java/org/apache/felix/dependencymanager/test2/integration/api/ServiceDependencyThroughCallbackInstanceTest.java?rev=1532237&r1=1532236&r2=1532237&view=diff
==============================================================================
--- felix/trunk/dependencymanager/test2/src/test/java/org/apache/felix/dependencymanager/test2/integration/api/ServiceDependencyThroughCallbackInstanceTest.java
(original)
+++ felix/trunk/dependencymanager/test2/src/test/java/org/apache/felix/dependencymanager/test2/integration/api/ServiceDependencyThroughCallbackInstanceTest.java
Tue Oct 15 07:51:10 2013
@@ -18,22 +18,14 @@
  */
 package org.apache.felix.dependencymanager.test2.integration.api;
 
-import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
-import static org.ops4j.pax.exam.CoreOptions.options;
-import static org.ops4j.pax.exam.CoreOptions.provision;
 import junit.framework.Assert;
 
+import org.apache.felix.dependencymanager.test2.integration.common.TestBase;
 import org.apache.felix.dm.DependencyManager;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.ops4j.pax.exam.Option;
-import org.ops4j.pax.exam.junit.Configuration;
-import org.ops4j.pax.exam.junit.JUnit4TestRunner;
-import org.osgi.framework.BundleContext;
-
 import org.ops4j.pax.exam.junit.PaxExam;
-import org.apache.felix.dependencymanager.test2.components.Ensure;
-import org.apache.felix.dependencymanager.test2.integration.common.TestBase;
+import org.osgi.framework.BundleContext;
 
 @RunWith(PaxExam.class)
 public class ServiceDependencyThroughCallbackInstanceTest extends TestBase {

Modified: felix/trunk/dependencymanager/test2/src/test/java/org/apache/felix/dependencymanager/test2/integration/api/ServiceUpdateTest.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/test2/src/test/java/org/apache/felix/dependencymanager/test2/integration/api/ServiceUpdateTest.java?rev=1532237&r1=1532236&r2=1532237&view=diff
==============================================================================
--- felix/trunk/dependencymanager/test2/src/test/java/org/apache/felix/dependencymanager/test2/integration/api/ServiceUpdateTest.java
(original)
+++ felix/trunk/dependencymanager/test2/src/test/java/org/apache/felix/dependencymanager/test2/integration/api/ServiceUpdateTest.java
Tue Oct 15 07:51:10 2013
@@ -18,10 +18,6 @@
  */
 package org.apache.felix.dependencymanager.test2.integration.api;
 
-import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
-import static org.ops4j.pax.exam.CoreOptions.options;
-import static org.ops4j.pax.exam.CoreOptions.provision;
-
 import java.net.MalformedURLException;
 import java.net.URL;
 import java.util.Dictionary;
@@ -33,24 +29,20 @@ import java.util.Properties;
 
 import junit.framework.Assert;
 
+import org.apache.felix.dependencymanager.test2.components.Ensure;
+import org.apache.felix.dependencymanager.test2.integration.common.TestBase;
 import org.apache.felix.dm.Component;
 import org.apache.felix.dm.DependencyManager;
 import org.apache.felix.dm.ResourceHandler;
 import org.apache.felix.dm.ResourceUtil;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.ops4j.pax.exam.Option;
-import org.ops4j.pax.exam.junit.Configuration;
-import org.ops4j.pax.exam.junit.JUnit4TestRunner;
+import org.ops4j.pax.exam.junit.PaxExam;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.Filter;
 import org.osgi.framework.InvalidSyntaxException;
 import org.osgi.framework.ServiceReference;
 
-import org.ops4j.pax.exam.junit.PaxExam;
-import org.apache.felix.dependencymanager.test2.components.Ensure;
-import org.apache.felix.dependencymanager.test2.integration.common.TestBase;
-
 @RunWith(PaxExam.class)
 public class ServiceUpdateTest extends TestBase {
     @Test

Modified: felix/trunk/dependencymanager/test2/src/test/java/org/apache/felix/dependencymanager/test2/integration/api/TemporalServiceDependencyTest.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/test2/src/test/java/org/apache/felix/dependencymanager/test2/integration/api/TemporalServiceDependencyTest.java?rev=1532237&r1=1532236&r2=1532237&view=diff
==============================================================================
--- felix/trunk/dependencymanager/test2/src/test/java/org/apache/felix/dependencymanager/test2/integration/api/TemporalServiceDependencyTest.java
(original)
+++ felix/trunk/dependencymanager/test2/src/test/java/org/apache/felix/dependencymanager/test2/integration/api/TemporalServiceDependencyTest.java
Tue Oct 15 07:51:10 2013
@@ -18,22 +18,13 @@
  */
 package org.apache.felix.dependencymanager.test2.integration.api;
 
-import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
-import static org.ops4j.pax.exam.CoreOptions.options;
-import static org.ops4j.pax.exam.CoreOptions.provision;
-
+import org.apache.felix.dependencymanager.test2.components.Ensure;
+import org.apache.felix.dependencymanager.test2.integration.common.TestBase;
 import org.apache.felix.dm.Component;
 import org.apache.felix.dm.DependencyManager;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.ops4j.pax.exam.Option;
-import org.ops4j.pax.exam.junit.Configuration;
-import org.ops4j.pax.exam.junit.JUnit4TestRunner;
-import org.osgi.framework.BundleContext;
-
 import org.ops4j.pax.exam.junit.PaxExam;
-import org.apache.felix.dependencymanager.test2.components.Ensure;
-import org.apache.felix.dependencymanager.test2.integration.common.TestBase;
 
 @RunWith(PaxExam.class)
 public class TemporalServiceDependencyTest extends TestBase {

Modified: felix/trunk/dependencymanager/test2/src/test/java/org/apache/felix/dependencymanager/test2/integration/common/TestBase.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/test2/src/test/java/org/apache/felix/dependencymanager/test2/integration/common/TestBase.java?rev=1532237&r1=1532236&r2=1532237&view=diff
==============================================================================
--- felix/trunk/dependencymanager/test2/src/test/java/org/apache/felix/dependencymanager/test2/integration/common/TestBase.java
(original)
+++ felix/trunk/dependencymanager/test2/src/test/java/org/apache/felix/dependencymanager/test2/integration/common/TestBase.java
Tue Oct 15 07:51:10 2013
@@ -53,7 +53,7 @@ import org.osgi.framework.ServiceReferen
 import org.osgi.framework.ServiceRegistration;
 import org.osgi.service.log.LogService;
 import org.slf4j.LoggerFactory;
-import ch.qos.logback.classic.Level;
+
 import ch.qos.logback.classic.Level;
 import ch.qos.logback.classic.Logger;
 
@@ -82,10 +82,17 @@ public abstract class TestBase implement
 
     protected ServiceRegistration logService;
     
-    protected boolean startComponents() {
-        return false; 
+    // Flag used to check if our test components (src/main/java/**/*) bundle must be started
+    private final boolean m_startTestComponentsBundle;
+    
+    public TestBase() {
+        this(false);
     }
-
+    
+    public TestBase(boolean startTestComponentsBundle) {
+        m_startTestComponentsBundle = startTestComponentsBundle;
+    }
+ 
     @Configuration
     public Option[] configuration() {
         final String bundleFileName = System.getProperty(BUNDLE_JAR_SYS_PROP, BUNDLE_JAR_DEFAULT);
@@ -114,7 +121,7 @@ public abstract class TestBase implement
                 mavenBundle("org.apache.felix", "org.apache.felix.dependencymanager","3.1.1-SNAPSHOT"),
                 mavenBundle("org.apache.felix", "org.apache.felix.dependencymanager.shell",
"3.0.2-SNAPSHOT"),
                 mavenBundle("org.apache.felix", "org.apache.felix.dependencymanager.runtime",
"3.1.1-SNAPSHOT"),
-                bundle(bundleFile.toURI().toString()).start(startComponents()));
+                bundle(bundleFile.toURI().toString()).start(m_startTestComponentsBundle));
         final Option option = (paxRunnerVmOption != null) ? vmOption(paxRunnerVmOption) :
null;
         return OptionUtils.combine(base, option);
     }



Mime
View raw message