felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pde...@apache.org
Subject svn commit: r1620564 - /felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/
Date Tue, 26 Aug 2014 11:00:22 GMT
Author: pderop
Date: Tue Aug 26 11:00:21 2014
New Revision: 1620564

URL: http://svn.apache.org/r1620564
Log:
code cleanup.

Modified:
    felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AbstractServiceDependencyTest.java
    felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AdapterAndConsumerTest.java
    felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AdapterWithConfigurationAndMetaType.java
    felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AdapterWithExtraDependenciesTest.java
    felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AdapterWithInstanceBoundDependencyParallelTest.java
    felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AdapterWithInstanceBoundDependencyTest.java
    felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AdapterWithModifiedInstanceBoundDependencyTest.java
    felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AdapterWithPropagationTest.java
    felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AspectBaseTest.java
    felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AspectChainTest.java
    felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AspectDynamicsParallelTest.java
    felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AspectDynamicsTest.java
    felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AspectRaceTest.java
    felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AspectServiceDependencyTest.java
    felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AspectServiceDependencyWithSwapCallbackTest.java
    felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AspectWhiteboardTest.java
    felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AspectWithCallbacksServiceDependencyTest.java
    felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AspectWithPropagationTest.java
    felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/BundleAdapterTest.java
    felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/BundleDependencyTest.java
    felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/ComponentTest.java
    felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/CompositionTest.java
    felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/ConfigurationDependencyTest.java
    felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/FELIX2078_ServiceDependencyTest.java
    felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/FELIX2344_ExtraDependencyWithAutoConfigTest.java
    felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/FELIX2344_ExtraDependencyWithCallbackTest.java
    felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/FELIX2348_ResourceAdapterTest.java
    felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/FELIX2369_ExtraDependencyTest.java
    felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/FELIX2696_ConfigurationAndServiceDependencyTest.java
    felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/FELIX2955_ShellCommandTest.java
    felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/FELIX3008_FilterIndexStartupTest.java
    felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/FELIX3057_EmptyServiceReferenceArray.java
    felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/FELIX3337_UpdatedConfigurationDependencyWithPropagationTest.java
    felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/FELIX4361_ConcurrentComponentListingTest.java
    felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/FactoryConfigurationAdapterTest.java
    felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/FilterIndexResourceAdapterTest.java
    felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/InstanceBoundDependencyTest.java
    felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/ModifiedBundleDependencyTest.java
    felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/MultipleExtraDependenciesTest.java
    felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/MultipleExtraDependencyTest.java
    felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/MultipleExtraDependencyTest2.java
    felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/MultipleServiceDependencyTest.java
    felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/RemovedDependencyTest.java
    felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/ResourceAdapterDependencyAddAndRemoveTest.java
    felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/ResourceAdapterDependencyAddAndRemoveTest2.java
    felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/ResourceAdapterTest.java
    felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/ResourceDependencyTest.java
    felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/ServiceDependencyInjectionTest.java
    felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/ServiceDependencyPropagateTest.java
    felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/ServiceDependencyTest.java
    felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/ServiceDependencyThroughCallbackInstanceTest.java
    felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/ServiceRaceTest.java
    felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/ServiceUpdateTest.java
    felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/TemporalServiceDependencyTest.java
    felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/TestBase.java

Modified: felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AbstractServiceDependencyTest.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AbstractServiceDependencyTest.java?rev=1620564&r1=1620563&r2=1620564&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AbstractServiceDependencyTest.java (original)
+++ felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AbstractServiceDependencyTest.java Tue Aug 26 11:00:21 2014
@@ -25,7 +25,7 @@ import junit.framework.Assert;
 
 public class AbstractServiceDependencyTest extends TestBase {
    public void testAbstractClassDependency() {
-       DependencyManager m = new DependencyManager(context);
+       DependencyManager m = getDM();
        // helper class that ensures certain steps get executed in sequence
        Ensure e = new Ensure();
        // create a service provider and consumer

Modified: felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AdapterAndConsumerTest.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AdapterAndConsumerTest.java?rev=1620564&r1=1620563&r2=1620564&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AdapterAndConsumerTest.java (original)
+++ felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AdapterAndConsumerTest.java Tue Aug 26 11:00:21 2014
@@ -24,7 +24,7 @@ import org.apache.felix.dm.DependencyMan
 public class AdapterAndConsumerTest extends TestBase {
     
     public void testServiceWithAdapterAndConsumer() {
-        DependencyManager m = new DependencyManager(context);
+        DependencyManager m = getDM();
         // helper class that ensures certain steps get executed in sequence
         Ensure e = new Ensure();
 

Modified: felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AdapterWithConfigurationAndMetaType.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AdapterWithConfigurationAndMetaType.java?rev=1620564&r1=1620563&r2=1620564&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AdapterWithConfigurationAndMetaType.java (original)
+++ felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AdapterWithConfigurationAndMetaType.java Tue Aug 26 11:00:21 2014
@@ -29,7 +29,7 @@ public class AdapterWithConfigurationAnd
     final static String WORDS_PROPERTY = "words";
     
     public void testAdapterWithConfigurationDependencyAndMetaType() {
-        DependencyManager m = new DependencyManager(context);
+        DependencyManager m = getDM();
         Ensure e = new Ensure();
         
         m.add(m.createAdapterService(A.class, null)
@@ -63,6 +63,7 @@ public class AdapterWithConfigurationAnd
         // now stop configurator, and ensure that all components have been stopped
         m.remove(configurator);
         e.waitForStep(7, 5000);
+        m.clear();
     }
     
     public interface A {

Modified: felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AdapterWithExtraDependenciesTest.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AdapterWithExtraDependenciesTest.java?rev=1620564&r1=1620563&r2=1620564&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AdapterWithExtraDependenciesTest.java (original)
+++ felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AdapterWithExtraDependenciesTest.java Tue Aug 26 11:00:21 2014
@@ -24,7 +24,7 @@ import org.apache.felix.dm.DependencyMan
 
 public class AdapterWithExtraDependenciesTest extends TestBase {
     public void testAdapterWithExtraDependenciesAndCallbacks() {
-        DependencyManager m = new DependencyManager(context);
+        DependencyManager m = getDM();
         // helper class that ensures certain steps get executed in sequence
         Ensure e = new Ensure();
         

Modified: felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AdapterWithInstanceBoundDependencyParallelTest.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AdapterWithInstanceBoundDependencyParallelTest.java?rev=1620564&r1=1620563&r2=1620564&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AdapterWithInstanceBoundDependencyParallelTest.java (original)
+++ felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AdapterWithInstanceBoundDependencyParallelTest.java Tue Aug 26 11:00:21 2014
@@ -2,6 +2,6 @@ package org.apache.felix.dm.itest;
 
 public class AdapterWithInstanceBoundDependencyParallelTest extends AdapterWithInstanceBoundDependencyTest {
     public AdapterWithInstanceBoundDependencyParallelTest() {
-        setParallel(true);
+        setParallel();
     }
 }

Modified: felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AdapterWithInstanceBoundDependencyTest.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AdapterWithInstanceBoundDependencyTest.java?rev=1620564&r1=1620563&r2=1620564&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AdapterWithInstanceBoundDependencyTest.java (original)
+++ felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AdapterWithInstanceBoundDependencyTest.java Tue Aug 26 11:00:21 2014
@@ -32,10 +32,10 @@ public class AdapterWithInstanceBoundDep
             .setInterface(ServiceInterface.class.getName(), null)
             .setImplementation(new ServiceProvider(e));
         Component sp2 = m.createComponent()
-        .setInterface(ServiceInterface2.class.getName(), null)
+            .setInterface(ServiceInterface2.class.getName(), null)
             .setImplementation(new ServiceProvider2(e));
         Component sc = m.createComponent()
-            .setImplementation(new ServiceConsumer())
+            .setImplementation(new ServiceConsumer(e))
             .add(m.createServiceDependency()
                 .setService(ServiceInterface3.class)
                 .setRequired(true));
@@ -47,11 +47,13 @@ public class AdapterWithInstanceBoundDep
         m.add(sp2);
         m.add(sa);
         e.waitForStep(5, 15000);
+        // cleanup
         m.remove(sa);
         m.remove(sp2);
         m.remove(sp);
         m.remove(sc);
         m.clear();
+        e.waitForStep(9, 5000); // make sure all components are stopped
     }
     
     static interface ServiceInterface {
@@ -76,6 +78,10 @@ public class AdapterWithInstanceBoundDep
         public void invoke() {
             m_ensure.step(4);
         }
+        
+        public void stop() {
+            m_ensure.step();
+        }
     }
 
     static class ServiceProvider implements ServiceInterface {
@@ -86,6 +92,9 @@ public class AdapterWithInstanceBoundDep
         public void invoke() {
             m_ensure.step(5);
         }
+        public void stop() {
+            m_ensure.step();
+        }
     }
     
     static class ServiceAdapter implements ServiceInterface3 {
@@ -112,12 +121,17 @@ public class AdapterWithInstanceBoundDep
         }
         
         public void stop() {
-            m_ensure.step(6);
+            m_ensure.step();
         }
     }
 
     static class ServiceConsumer implements Runnable {
-        private volatile ServiceInterface3 m_service;
+        volatile ServiceInterface3 m_service;
+        final Ensure m_ensure;
+        
+        ServiceConsumer(Ensure e) {
+            m_ensure = e;
+        }
         
         public void init() {
             Thread t = new Thread(this);
@@ -127,6 +141,9 @@ public class AdapterWithInstanceBoundDep
         public void run() {
             m_service.invoke();
         }
+        public void stop() {
+            m_ensure.step();
+        }
     }
 }
 

Modified: felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AdapterWithModifiedInstanceBoundDependencyTest.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AdapterWithModifiedInstanceBoundDependencyTest.java?rev=1620564&r1=1620563&r2=1620564&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AdapterWithModifiedInstanceBoundDependencyTest.java (original)
+++ felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AdapterWithModifiedInstanceBoundDependencyTest.java Tue Aug 26 11:00:21 2014
@@ -112,7 +112,7 @@ public class AdapterWithModifiedInstance
     }
     
     public void testAdapterWithChangedInstanceBoundDependency() {
-        DependencyManager m = new DependencyManager(context);
+        DependencyManager m = getDM();
         Ensure e = new Ensure();
 
         Dictionary props = new Hashtable();

Modified: felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AdapterWithPropagationTest.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AdapterWithPropagationTest.java?rev=1620564&r1=1620563&r2=1620564&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AdapterWithPropagationTest.java (original)
+++ felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AdapterWithPropagationTest.java Tue Aug 26 11:00:21 2014
@@ -95,7 +95,7 @@ public class AdapterWithPropagationTest 
     }
     
     public void testAdapterWithPropagation() {
-        DependencyManager m = new DependencyManager(context);
+        DependencyManager m = getDM();
         // helper class that ensures certain steps get executed in sequence
         Ensure e = new Ensure(); 
         

Modified: felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AspectBaseTest.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AspectBaseTest.java?rev=1620564&r1=1620563&r2=1620564&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AspectBaseTest.java (original)
+++ felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AspectBaseTest.java Tue Aug 26 11:00:21 2014
@@ -13,7 +13,7 @@ import org.osgi.framework.ServiceRegistr
 public class AspectBaseTest extends TestBase {    
 
 	public void testSingleAspect() {
-        DependencyManager m = new DependencyManager(context);
+	    DependencyManager m = getDM();
         // helper class that ensures certain steps get executed in sequence
         Ensure e = new Ensure();
         

Modified: felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AspectChainTest.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AspectChainTest.java?rev=1620564&r1=1620563&r2=1620564&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AspectChainTest.java (original)
+++ felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AspectChainTest.java Tue Aug 26 11:00:21 2014
@@ -5,7 +5,7 @@ import org.apache.felix.dm.DependencyMan
 public class AspectChainTest extends TestBase {
 
 	public void testBuildAspectChain() {
-        DependencyManager m = new DependencyManager(context);
+	    DependencyManager m = getDM();
         // helper class that ensures certain steps get executed in sequence
         Ensure e = new Ensure();
         // create a service provider and consumer

Modified: felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AspectDynamicsParallelTest.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AspectDynamicsParallelTest.java?rev=1620564&r1=1620563&r2=1620564&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AspectDynamicsParallelTest.java (original)
+++ felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AspectDynamicsParallelTest.java Tue Aug 26 11:00:21 2014
@@ -2,6 +2,6 @@ package org.apache.felix.dm.itest;
 
 public class AspectDynamicsParallelTest extends AspectDynamicsTest {
     public AspectDynamicsParallelTest() {
-        setParallel(true);
+        setParallel();
     }
 }

Modified: felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AspectDynamicsTest.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AspectDynamicsTest.java?rev=1620564&r1=1620563&r2=1620564&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AspectDynamicsTest.java (original)
+++ felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AspectDynamicsTest.java Tue Aug 26 11:00:21 2014
@@ -55,6 +55,7 @@ public class AspectDynamicsTest extends 
         m.remove(provider2);
         m.remove(provider);
         m.remove(consumer);
+        e.waitForStep(16, 15000);
     }
     
     static interface ServiceInterface {
@@ -75,6 +76,9 @@ public class AspectDynamicsTest extends 
         public void invoke() {
             m_ensure.step(9);
         }
+        public void stop() {
+            m_ensure.step();
+        }
     }
 
     static class ServiceProvider implements ServiceInterface {
@@ -85,6 +89,9 @@ public class AspectDynamicsTest extends 
         public void invoke(Runnable run) {
             run.run();
         }
+        public void stop() {
+            m_ensure.step();
+        }
     }
     
     static class ServiceAspect implements ServiceInterface {
@@ -141,5 +148,9 @@ public class AspectDynamicsTest extends 
             m_ensure.waitForStep(12, 15000);
             m_service.invoke(Ensure.createRunnableStep(m_ensure, 13));
         }
+        
+        public void stop() {
+            m_ensure.step();
+        }
     }
 }

Modified: felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AspectRaceTest.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AspectRaceTest.java?rev=1620564&r1=1620563&r2=1620564&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AspectRaceTest.java (original)
+++ felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AspectRaceTest.java Tue Aug 26 11:00:21 2014
@@ -18,7 +18,6 @@ import org.osgi.framework.ServiceReferen
 public class AspectRaceTest extends TestBase {
 	volatile ExecutorService m_serviceExec;
 	volatile ExecutorService m_aspectExec;
-	volatile DependencyManager m_dm;
 	final static int SERVICES = 3;
 	final static int ASPECTS_PER_SERVICE = 3;
 	final static int ITERATIONS = 3000;
@@ -36,7 +35,6 @@ public class AspectRaceTest extends Test
 			// We create a Controller which is injected with some S services,
 			// and each S services has some aspects (SAspect).
 
-			m_dm = new DependencyManager(context);
 			Controller controller = new Controller();
 			ServiceDependency dependency = m_dm.createServiceDependency().setService(S.class)
 					.setCallbacks("bind", null, "unbind", "swap")

Modified: felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AspectServiceDependencyTest.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AspectServiceDependencyTest.java?rev=1620564&r1=1620563&r2=1620564&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AspectServiceDependencyTest.java (original)
+++ felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AspectServiceDependencyTest.java Tue Aug 26 11:00:21 2014
@@ -24,7 +24,7 @@ import org.apache.felix.dm.DependencyMan
 
 public class AspectServiceDependencyTest extends TestBase {
     public void testServiceRegistrationAndConsumption() {
-        DependencyManager m = new DependencyManager(context);
+        DependencyManager m = getDM();
         // helper class that ensures certain steps get executed in sequence
         Ensure e = new Ensure();
         // create a service provider and consumer

Modified: felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AspectServiceDependencyWithSwapCallbackTest.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AspectServiceDependencyWithSwapCallbackTest.java?rev=1620564&r1=1620563&r2=1620564&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AspectServiceDependencyWithSwapCallbackTest.java (original)
+++ felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AspectServiceDependencyWithSwapCallbackTest.java Tue Aug 26 11:00:21 2014
@@ -24,7 +24,7 @@ import org.apache.felix.dm.DependencyMan
 
 public class AspectServiceDependencyWithSwapCallbackTest extends TestBase {
     public void testServiceRegistrationAndConsumption() {
-        DependencyManager m = new DependencyManager(context);
+        DependencyManager m = getDM();
         // helper class that ensures certain steps get executed in sequence
         Ensure e = new Ensure();
         // create a service provider and consumer

Modified: felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AspectWhiteboardTest.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AspectWhiteboardTest.java?rev=1620564&r1=1620563&r2=1620564&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AspectWhiteboardTest.java (original)
+++ felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AspectWhiteboardTest.java Tue Aug 26 11:00:21 2014
@@ -12,7 +12,7 @@ import org.osgi.framework.ServiceReferen
 public class AspectWhiteboardTest extends TestBase {
 
 	public void testWhiteboardConsumer() {
-        DependencyManager m = new DependencyManager(context);
+        DependencyManager m = getDM();
         // helper class that ensures certain steps get executed in sequence
         Ensure e = new Ensure();
         // create service providers and consumer

Modified: felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AspectWithCallbacksServiceDependencyTest.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AspectWithCallbacksServiceDependencyTest.java?rev=1620564&r1=1620563&r2=1620564&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AspectWithCallbacksServiceDependencyTest.java (original)
+++ felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AspectWithCallbacksServiceDependencyTest.java Tue Aug 26 11:00:21 2014
@@ -24,7 +24,7 @@ import org.apache.felix.dm.DependencyMan
 
 public class AspectWithCallbacksServiceDependencyTest extends TestBase {
     public void testServiceRegistrationAndConsumption() {
-        DependencyManager m = new DependencyManager(context);
+        DependencyManager m = getDM();
         // helper class that ensures certain steps get executed in sequence
         Ensure e = new Ensure();
         // create a service provider and consumer

Modified: felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AspectWithPropagationTest.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AspectWithPropagationTest.java?rev=1620564&r1=1620563&r2=1620564&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AspectWithPropagationTest.java (original)
+++ felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/AspectWithPropagationTest.java Tue Aug 26 11:00:21 2014
@@ -25,7 +25,7 @@ public class AspectWithPropagationTest e
     private final Random _rnd = new Random();
     private static Ensure m_invokeStep;
     private static Ensure m_changeStep;
-        
+    
     /**
      * This test does the following:
      * 
@@ -167,7 +167,7 @@ public class AspectWithPropagationTest e
         for (int i = 0; i < ASPECTS; i ++) {
             int index = getRandomAspect();
             m.add(aspects[index]);
-            if (_rnd.nextBoolean()) {
+            if (! originalServiceAdded && _rnd.nextBoolean()) {
                 m.add(s);
                 originalServiceAdded = true;
             }
@@ -285,7 +285,7 @@ public class AspectWithPropagationTest e
         for (int i = 0; i < ASPECTS; i ++) {
             int index = getRandomAspect();
             m.add(aspects[index]);
-            if (_rnd.nextBoolean()) {
+            if (! originalServiceAdded && _rnd.nextBoolean()) {
                 m.add(s);
                 originalServiceAdded = true;
             }
@@ -393,7 +393,7 @@ public class AspectWithPropagationTest e
         for (int i = 0; i < ASPECTS; i ++) {
             int index = getRandomAspect();
             m.add(aspects[index]);
-            if (_rnd.nextBoolean()) {
+            if (! originalServiceAdded && _rnd.nextBoolean()) {
                 m.add(s);
                 originalServiceAdded = true;
             }
@@ -489,7 +489,7 @@ public class AspectWithPropagationTest e
         for (int i = 0; i < ASPECTS; i ++) {
             int index = getRandomAspect();
             m.add(aspects[index]);
-            if (_rnd.nextBoolean()) {
+            if (! originalServiceAdded && _rnd.nextBoolean()) {
                 m.add(s);
                 originalServiceAdded = true;
             }

Modified: felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/BundleAdapterTest.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/BundleAdapterTest.java?rev=1620564&r1=1620563&r2=1620564&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/BundleAdapterTest.java (original)
+++ felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/BundleAdapterTest.java Tue Aug 26 11:00:21 2014
@@ -11,7 +11,7 @@ public class BundleAdapterTest extends T
     private final static String BSN = "org.apache.felix.metatype";
     
     public void testBundleAdapter() {
-        DependencyManager m = new DependencyManager(context);
+        DependencyManager m = getDM();
         // create a bundle adapter service (one is created for each bundle)
         Component adapter = m.createBundleAdapterService(Bundle.INSTALLED | Bundle.RESOLVED | Bundle.ACTIVE, null, false)
                              .setImplementation(BundleAdapter.class)

Modified: felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/BundleDependencyTest.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/BundleDependencyTest.java?rev=1620564&r1=1620563&r2=1620564&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/BundleDependencyTest.java (original)
+++ felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/BundleDependencyTest.java Tue Aug 26 11:00:21 2014
@@ -10,7 +10,7 @@ public class BundleDependencyTest extend
     private final static String BSN = "org.apache.felix.metatype";
     
     public void testBundleDependencies() {
-        DependencyManager m = new DependencyManager(context);
+        DependencyManager m = getDM();
         // create a service provider and consumer
         Consumer c = new Consumer();
         Component consumer = m.createComponent().setImplementation(c).add(m.createBundleDependency().setCallbacks("add", "remove"));
@@ -35,7 +35,7 @@ public class BundleDependencyTest extend
     }
     
     public void testRequiredBundleDependency() {
-        DependencyManager m = new DependencyManager(context);
+        DependencyManager m = getDM();
         // create a service provider and consumer
         Consumer c = new Consumer();
         

Modified: felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/ComponentTest.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/ComponentTest.java?rev=1620564&r1=1620563&r2=1620564&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/ComponentTest.java (original)
+++ felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/ComponentTest.java Tue Aug 26 11:00:21 2014
@@ -13,7 +13,7 @@ public class ComponentTest extends TestB
     private final Ensure m_ensure = new Ensure();
 
     public void testSimple() throws Exception {
-        DependencyManager dm = new DependencyManager(context);
+        final DependencyManager dm = getDM();
         Component consumer = dm.createComponent();
         consumer
             .setImplementation(new Consumer())

Modified: felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/CompositionTest.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/CompositionTest.java?rev=1620564&r1=1620563&r2=1620564&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/CompositionTest.java (original)
+++ felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/CompositionTest.java Tue Aug 26 11:00:21 2014
@@ -24,7 +24,7 @@ import org.apache.felix.dm.DependencyMan
 
 public class CompositionTest extends TestBase {
     public void testComposition() {
-        DependencyManager m = new DependencyManager(context);
+        DependencyManager m = getDM();
         // helper class that ensures certain steps get executed in sequence
         Ensure e = new Ensure();
         // create a service provider and consumer

Modified: felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/ConfigurationDependencyTest.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/ConfigurationDependencyTest.java?rev=1620564&r1=1620563&r2=1620564&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/ConfigurationDependencyTest.java (original)
+++ felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/ConfigurationDependencyTest.java Tue Aug 26 11:00:21 2014
@@ -37,7 +37,7 @@ public class ConfigurationDependencyTest
     final static String PID = "ConfigurationDependencyTest.pid";
     
     public void testComponentWithRequiredConfigurationAndServicePropertyPropagation() {
-        DependencyManager m = new DependencyManager(context);
+        DependencyManager m = getDM();
         // helper class that ensures certain steps get executed in sequence
         Ensure e = new Ensure();
         // create a service provider and consumer
@@ -57,7 +57,7 @@ public class ConfigurationDependencyTest
     
     public void testFELIX2987() {
         // mimics testComponentWithRequiredConfigurationAndServicePropertyPropagation
-        DependencyManager m = new DependencyManager(context);
+        DependencyManager m = getDM();
         // helper class that ensures certain steps get executed in sequence
         Ensure e = new Ensure();
         // create a service provider and consumer

Modified: felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/FELIX2078_ServiceDependencyTest.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/FELIX2078_ServiceDependencyTest.java?rev=1620564&r1=1620563&r2=1620564&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/FELIX2078_ServiceDependencyTest.java (original)
+++ felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/FELIX2078_ServiceDependencyTest.java Tue Aug 26 11:00:21 2014
@@ -23,7 +23,7 @@ import org.apache.felix.dm.DependencyMan
 
 public class FELIX2078_ServiceDependencyTest extends TestBase {
     public void testRequiredServiceRegistrationAndConsumption() {
-        DependencyManager m = new DependencyManager(context);
+        DependencyManager m = getDM();
         // helper class that ensures certain steps get executed in sequence
         Ensure e = new Ensure();
         // create a service provider and consumer
@@ -44,7 +44,7 @@ public class FELIX2078_ServiceDependency
     }
     
     public void testOptionalServiceRegistrationAndConsumption() {
-        DependencyManager m = new DependencyManager(context);
+        DependencyManager m = getDM();
         // helper class that ensures certain steps get executed in sequence
         Ensure e = new Ensure();
         // create a service provider and consumer

Modified: felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/FELIX2344_ExtraDependencyWithAutoConfigTest.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/FELIX2344_ExtraDependencyWithAutoConfigTest.java?rev=1620564&r1=1620563&r2=1620564&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/FELIX2344_ExtraDependencyWithAutoConfigTest.java (original)
+++ felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/FELIX2344_ExtraDependencyWithAutoConfigTest.java Tue Aug 26 11:00:21 2014
@@ -29,7 +29,7 @@ public class FELIX2344_ExtraDependencyWi
      * Test if an auto config extra dependency is injected in the expected order.
      */
     public void testExtraDependencyWithAutoConfig() {  
-        DependencyManager m = new DependencyManager(context);
+        DependencyManager m = getDM();
         // Helper class that ensures certain steps get executed in sequence
         Ensure e = new Ensure();
         // Create a service provider

Modified: felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/FELIX2344_ExtraDependencyWithCallbackTest.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/FELIX2344_ExtraDependencyWithCallbackTest.java?rev=1620564&r1=1620563&r2=1620564&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/FELIX2344_ExtraDependencyWithCallbackTest.java (original)
+++ felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/FELIX2344_ExtraDependencyWithCallbackTest.java Tue Aug 26 11:00:21 2014
@@ -31,7 +31,7 @@ public class FELIX2344_ExtraDependencyWi
      * Checks if an extra optional/required dependency is properly injected into a consumer, using callbacks.
      */
     public void testExtraDependencyWithCallback() {
-        DependencyManager m = new DependencyManager(context);
+        DependencyManager m = getDM();
         // helper class that ensures certain steps get executed in sequence
         Ensure e = new Ensure();
         // create a service consumer and provider

Modified: felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/FELIX2348_ResourceAdapterTest.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/FELIX2348_ResourceAdapterTest.java?rev=1620564&r1=1620563&r2=1620564&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/FELIX2348_ResourceAdapterTest.java (original)
+++ felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/FELIX2348_ResourceAdapterTest.java Tue Aug 26 11:00:21 2014
@@ -21,7 +21,7 @@ import org.osgi.framework.ServiceReferen
 
 public class FELIX2348_ResourceAdapterTest extends TestBase {
     public void testBasicResourceAdapter() throws Exception {
-        DependencyManager m = new DependencyManager(context);
+        DependencyManager m = getDM();
         // helper class that ensures certain steps get executed in sequence
         Ensure e = new Ensure();
         m.add(m.createResourceAdapterService("(&(path=/path/to/*.txt)(host=localhost))", false, null, "changed")

Modified: felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/FELIX2369_ExtraDependencyTest.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/FELIX2369_ExtraDependencyTest.java?rev=1620564&r1=1620563&r2=1620564&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/FELIX2369_ExtraDependencyTest.java (original)
+++ felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/FELIX2369_ExtraDependencyTest.java Tue Aug 26 11:00:21 2014
@@ -35,7 +35,7 @@ import junit.framework.Assert;
 public class FELIX2369_ExtraDependencyTest extends TestBase
 {
     public void testExtraDependencies() {
-        DependencyManager m = new DependencyManager(context);
+        DependencyManager m = getDM();
         // helper class that ensures certain steps get executed in sequence
         Ensure e = new Ensure();
         // create a service consumer and provider

Modified: felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/FELIX2696_ConfigurationAndServiceDependencyTest.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/FELIX2696_ConfigurationAndServiceDependencyTest.java?rev=1620564&r1=1620563&r2=1620564&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/FELIX2696_ConfigurationAndServiceDependencyTest.java (original)
+++ felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/FELIX2696_ConfigurationAndServiceDependencyTest.java Tue Aug 26 11:00:21 2014
@@ -36,7 +36,7 @@ public class FELIX2696_ConfigurationAndS
     final static String PID = "FELIX2696_ConfigurationAndServiceDependencyTest.pid";
 
     public void testComponentWithRequiredConfigurationAndServicePropertyPropagation() {
-        DependencyManager m = new DependencyManager(context);
+        DependencyManager m = getDM();
         // helper class that ensures certain steps get executed in sequence
         Ensure e = new Ensure();
         // create a service provider and consumer

Modified: felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/FELIX2955_ShellCommandTest.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/FELIX2955_ShellCommandTest.java?rev=1620564&r1=1620563&r2=1620564&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/FELIX2955_ShellCommandTest.java (original)
+++ felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/FELIX2955_ShellCommandTest.java Tue Aug 26 11:00:21 2014
@@ -42,7 +42,7 @@ public class FELIX2955_ShellCommandTest 
                 break;
             }
         }
-        DependencyManager m = new DependencyManager(context);
+        DependencyManager m = getDM();
         // helper class that ensures certain steps get executed in sequence
         Ensure e = new Ensure();
         

Modified: felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/FELIX3008_FilterIndexStartupTest.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/FELIX3008_FilterIndexStartupTest.java?rev=1620564&r1=1620563&r2=1620564&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/FELIX3008_FilterIndexStartupTest.java (original)
+++ felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/FELIX3008_FilterIndexStartupTest.java Tue Aug 26 11:00:21 2014
@@ -29,7 +29,7 @@ import org.osgi.framework.Bundle;
 public class FELIX3008_FilterIndexStartupTest extends TestBase {
     public void testNormalStart() throws Exception {
         System.setProperty("org.apache.felix.dependencymanager.filterindex", "objectClass");
-        DependencyManager m = new DependencyManager(context);
+        DependencyManager m = getDM();
         // helper class that ensures certain steps get executed in sequence
         Ensure e = new Ensure();
         // create a provider

Modified: felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/FELIX3057_EmptyServiceReferenceArray.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/FELIX3057_EmptyServiceReferenceArray.java?rev=1620564&r1=1620563&r2=1620564&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/FELIX3057_EmptyServiceReferenceArray.java (original)
+++ felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/FELIX3057_EmptyServiceReferenceArray.java Tue Aug 26 11:00:21 2014
@@ -37,7 +37,7 @@ public class FELIX3057_EmptyServiceRefer
     }
 
     private void executeTest(BundleContext context) throws InvalidSyntaxException {
-        DependencyManager m = new DependencyManager(context);
+        DependencyManager m = getDM();
         Assert.assertNull("Looking up a non-existing service should return null.", m.getBundleContext().getServiceReferences(Service.class.getName(), "(objectClass=*)"));
         Assert.assertNull("Looking up a non-existing service should return null.", m.getBundleContext().getAllServiceReferences(Service.class.getName(), "(objectClass=*)"));
         Assert.assertNull("Looking up a non-existing service should return null.", m.getBundleContext().getServiceReference(Service.class.getName()));

Modified: felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/FELIX3337_UpdatedConfigurationDependencyWithPropagationTest.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/FELIX3337_UpdatedConfigurationDependencyWithPropagationTest.java?rev=1620564&r1=1620563&r2=1620564&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/FELIX3337_UpdatedConfigurationDependencyWithPropagationTest.java (original)
+++ felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/FELIX3337_UpdatedConfigurationDependencyWithPropagationTest.java Tue Aug 26 11:00:21 2014
@@ -111,7 +111,7 @@ public class FELIX3337_UpdatedConfigurat
     }
     
     public void testComponentWithRequiredUpdatedConfigurationAndServicePropertyPropagation() {
-        DependencyManager m = new DependencyManager(context);
+        DependencyManager m = getDM();
         // helper class that ensures certain steps get executed in sequence
         Ensure e = new Ensure();        
         ConfigurationCreator confCreator = new ConfigurationCreator();

Modified: felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/FELIX4361_ConcurrentComponentListingTest.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/FELIX4361_ConcurrentComponentListingTest.java?rev=1620564&r1=1620563&r2=1620564&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/FELIX4361_ConcurrentComponentListingTest.java (original)
+++ felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/FELIX4361_ConcurrentComponentListingTest.java Tue Aug 26 11:00:21 2014
@@ -39,7 +39,7 @@ import junit.framework.Assert;
 public class FELIX4361_ConcurrentComponentListingTest extends TestBase {
 
     public void testConcurrentGetComponentsManipulation() {
-        DependencyManager dm = new DependencyManager(context);
+        DependencyManager dm = getDM();
         dm.add(dm.createComponent().setImplementation(Object.class));
         Iterator iterator = dm.getComponents().iterator();
         dm.add(dm.createComponent().setImplementation(Object.class));
@@ -47,7 +47,7 @@ public class FELIX4361_ConcurrentCompone
     }
 
     public void testConcurrentGetComponentsMultipleThreads() {
-        final DependencyManager m = new DependencyManager(context);
+        final DependencyManager m = getDM();
         final AtomicInteger errors = new AtomicInteger(0);
         final AtomicInteger componentsAdded = new AtomicInteger(0);
         final int max = 10000;

Modified: felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/FactoryConfigurationAdapterTest.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/FactoryConfigurationAdapterTest.java?rev=1620564&r1=1620563&r2=1620564&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/FactoryConfigurationAdapterTest.java (original)
+++ felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/FactoryConfigurationAdapterTest.java Tue Aug 26 11:00:21 2014
@@ -17,7 +17,7 @@ public class FactoryConfigurationAdapter
     private static Ensure m_ensure;
     
     public void testFactoryConfigurationAdapter() {
-        DependencyManager m = new DependencyManager(context);
+        DependencyManager m = getDM();
         // helper class that ensures certain steps get executed in sequence
         m_ensure = new Ensure();
         

Modified: felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/FilterIndexResourceAdapterTest.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/FilterIndexResourceAdapterTest.java?rev=1620564&r1=1620563&r2=1620564&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/FilterIndexResourceAdapterTest.java (original)
+++ felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/FilterIndexResourceAdapterTest.java Tue Aug 26 11:00:21 2014
@@ -25,7 +25,7 @@ import org.osgi.framework.ServiceReferen
 public class FilterIndexResourceAdapterTest extends TestBase {
   public void testBasicResourceAdapter() throws Exception {
       System.setProperty("org.apache.felix.dependencymanager.filterindex", "objectClass");
-      DependencyManager m = new DependencyManager(context);
+      DependencyManager m = getDM();
       // helper class that ensures certain steps get executed in sequence
       Ensure e = new Ensure();
       // create a resource provider

Modified: felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/InstanceBoundDependencyTest.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/InstanceBoundDependencyTest.java?rev=1620564&r1=1620563&r2=1620564&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/InstanceBoundDependencyTest.java (original)
+++ felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/InstanceBoundDependencyTest.java Tue Aug 26 11:00:21 2014
@@ -40,7 +40,7 @@ public class InstanceBoundDependencyTest
     Ensure m_e;
     
     public void testServiceInjection() {
-        DependencyManager m = new DependencyManager(context);
+        DependencyManager m = getDM();
         m_e = new Ensure();
         
         // Create a "C" component: it depends on some S1 services, and on some S2 instance-bound services (declared from C.init() method)        

Modified: felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/ModifiedBundleDependencyTest.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/ModifiedBundleDependencyTest.java?rev=1620564&r1=1620563&r2=1620564&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/ModifiedBundleDependencyTest.java (original)
+++ felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/ModifiedBundleDependencyTest.java Tue Aug 26 11:00:21 2014
@@ -79,7 +79,7 @@ public class ModifiedBundleDependencyTes
     }
     
     public void testAdapterWithChangedInstanceBoundDependency() {
-        DependencyManager m = new DependencyManager(context);
+        DependencyManager m = getDM();
         Ensure e = new Ensure();
 
         Component a = m.createComponent()

Modified: felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/MultipleExtraDependenciesTest.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/MultipleExtraDependenciesTest.java?rev=1620564&r1=1620563&r2=1620564&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/MultipleExtraDependenciesTest.java (original)
+++ felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/MultipleExtraDependenciesTest.java Tue Aug 26 11:00:21 2014
@@ -34,7 +34,7 @@ public class MultipleExtraDependenciesTe
      * A component c1 will define two extra dependencies over *available* c4/c5 services.
      */
      public void testWithTwoAvailableExtraDependency() {   
-         DependencyManager m = new DependencyManager(context);
+         DependencyManager m = getDM();
          // Helper class that ensures certain steps get executed in sequence
          Ensure e = new Ensure();
          Component c1 = m.createComponent()
@@ -95,7 +95,7 @@ public class MultipleExtraDependenciesTe
      * Then c5 is added, and it triggers the c1 activation ...
      */
     public void testWithOneAvailableExtraDependency() {  
-        DependencyManager m = new DependencyManager(context);
+        DependencyManager m = getDM();
         // Helper class that ensures certain steps get executed in sequence
         Ensure e = new Ensure();
         Component c1 = m.createComponent()

Modified: felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/MultipleExtraDependencyTest.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/MultipleExtraDependencyTest.java?rev=1620564&r1=1620563&r2=1620564&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/MultipleExtraDependencyTest.java (original)
+++ felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/MultipleExtraDependencyTest.java Tue Aug 26 11:00:21 2014
@@ -30,7 +30,7 @@ import org.apache.felix.dm.DependencyMan
 public class MultipleExtraDependencyTest extends TestBase {
     public void testMultipleExtraDependencies()
     {
-        DependencyManager m = new DependencyManager(context);
+        DependencyManager m = getDM();
         Ensure e = new Ensure();
         
         Component sp2 = m.createComponent()

Modified: felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/MultipleExtraDependencyTest2.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/MultipleExtraDependencyTest2.java?rev=1620564&r1=1620563&r2=1620564&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/MultipleExtraDependencyTest2.java (original)
+++ felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/MultipleExtraDependencyTest2.java Tue Aug 26 11:00:21 2014
@@ -35,7 +35,7 @@ import org.apache.felix.dm.ServiceDepend
 public class MultipleExtraDependencyTest2 extends TestBase {
     public void testMultipleExtraDependencies()
     {
-        DependencyManager m = new DependencyManager(context);
+        DependencyManager m = getDM();
         Ensure e = new Ensure();
         
         Component sp2 = m.createComponent()

Modified: felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/MultipleServiceDependencyTest.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/MultipleServiceDependencyTest.java?rev=1620564&r1=1620563&r2=1620564&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/MultipleServiceDependencyTest.java (original)
+++ felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/MultipleServiceDependencyTest.java Tue Aug 26 11:00:21 2014
@@ -26,7 +26,7 @@ import org.osgi.framework.Constants;
 
 public class MultipleServiceDependencyTest extends TestBase {
    public void testMultipleServiceRegistrationAndConsumption() {
-       DependencyManager m = new DependencyManager(context);
+       DependencyManager m = getDM();
        // helper class that ensures certain steps get executed in sequence
        Ensure e = new Ensure();
        // create a service provider and consumer
@@ -46,7 +46,7 @@ public class MultipleServiceDependencyTe
    }
 
    public void testReplacementAutoConfig() {
-       DependencyManager m = new DependencyManager(context);
+       DependencyManager m = getDM();
        // helper class that ensures certain steps get executed in sequence
        Ensure e = new Ensure();
        // create a service provider and consumer
@@ -66,7 +66,7 @@ public class MultipleServiceDependencyTe
    }
 
    public void testReplacementCallbacks() {
-       DependencyManager m = new DependencyManager(context);
+       DependencyManager m = getDM();
        // helper class that ensures certain steps get executed in sequence
        Ensure e = new Ensure();
        // create a service provider and consumer

Modified: felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/RemovedDependencyTest.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/RemovedDependencyTest.java?rev=1620564&r1=1620563&r2=1620564&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/RemovedDependencyTest.java (original)
+++ felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/RemovedDependencyTest.java Tue Aug 26 11:00:21 2014
@@ -23,7 +23,7 @@ import org.osgi.framework.ServiceReferen
  */
 public class RemovedDependencyTest extends TestBase {
     public void testRemoveDependencyAndConsumerMustRemainStarted() {
-        DependencyManager m = new DependencyManager(context);
+        DependencyManager m = getDM();
         // helper class that ensures certain steps get executed in sequence
         Ensure e = new Ensure();
         // Create two providers

Modified: felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/ResourceAdapterDependencyAddAndRemoveTest.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/ResourceAdapterDependencyAddAndRemoveTest.java?rev=1620564&r1=1620563&r2=1620564&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/ResourceAdapterDependencyAddAndRemoveTest.java (original)
+++ felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/ResourceAdapterDependencyAddAndRemoveTest.java Tue Aug 26 11:00:21 2014
@@ -22,7 +22,7 @@ import org.osgi.framework.ServiceReferen
 
 public class ResourceAdapterDependencyAddAndRemoveTest extends TestBase {
     public void testBasicResourceAdapter() throws Exception {
-        DependencyManager m = new DependencyManager(context);
+        DependencyManager m = getDM();
         // helper class that ensures certain steps get executed in sequence
         Ensure e = new Ensure();
 

Modified: felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/ResourceAdapterDependencyAddAndRemoveTest2.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/ResourceAdapterDependencyAddAndRemoveTest2.java?rev=1620564&r1=1620563&r2=1620564&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/ResourceAdapterDependencyAddAndRemoveTest2.java (original)
+++ felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/ResourceAdapterDependencyAddAndRemoveTest2.java Tue Aug 26 11:00:21 2014
@@ -23,7 +23,7 @@ import org.osgi.framework.ServiceReferen
 
 public class ResourceAdapterDependencyAddAndRemoveTest2 extends TestBase {
     public void testBasicResourceAdapter() throws Exception {
-        DependencyManager m = new DependencyManager(context);
+        DependencyManager m = getDM();
         // helper class that ensures certain steps get executed in sequence
         Ensure e = new Ensure();
         // create a resource provider

Modified: felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/ResourceAdapterTest.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/ResourceAdapterTest.java?rev=1620564&r1=1620563&r2=1620564&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/ResourceAdapterTest.java (original)
+++ felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/ResourceAdapterTest.java Tue Aug 26 11:00:21 2014
@@ -21,7 +21,7 @@ import org.osgi.framework.ServiceReferen
 
 public class ResourceAdapterTest extends TestBase {
     public void testBasicResourceAdapter() throws Exception {
-        DependencyManager m = new DependencyManager(context);
+        DependencyManager m = getDM();
         // helper class that ensures certain steps get executed in sequence
         Ensure e = new Ensure();
         // create a resource provider

Modified: felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/ResourceDependencyTest.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/ResourceDependencyTest.java?rev=1620564&r1=1620563&r2=1620564&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/ResourceDependencyTest.java (original)
+++ felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/ResourceDependencyTest.java Tue Aug 26 11:00:21 2014
@@ -22,7 +22,7 @@ import org.osgi.framework.ServiceReferen
 
 public class ResourceDependencyTest extends TestBase {
     public void testResourceDependency() {
-        DependencyManager m = new DependencyManager(context);
+        DependencyManager m = getDM();
         // helper class that ensures certain steps get executed in sequence
         Ensure e = new Ensure();
         // create a service provider and consumer

Modified: felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/ServiceDependencyInjectionTest.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/ServiceDependencyInjectionTest.java?rev=1620564&r1=1620563&r2=1620564&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/ServiceDependencyInjectionTest.java (original)
+++ felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/ServiceDependencyInjectionTest.java Tue Aug 26 11:00:21 2014
@@ -25,7 +25,7 @@ import junit.framework.Assert;
 
 public class ServiceDependencyInjectionTest extends TestBase {
     public void testServiceInjection() {
-        DependencyManager m = new DependencyManager(context);
+        DependencyManager m = getDM();
         Ensure e = new Ensure();
         // create a service provider and consumer
         ServiceProvider provider = new ServiceProvider(e);

Modified: felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/ServiceDependencyPropagateTest.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/ServiceDependencyPropagateTest.java?rev=1620564&r1=1620563&r2=1620564&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/ServiceDependencyPropagateTest.java (original)
+++ felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/ServiceDependencyPropagateTest.java Tue Aug 26 11:00:21 2014
@@ -34,7 +34,7 @@ public class ServiceDependencyPropagateT
      * Checks that a ServiceDependency propagates the dependency service properties to the provided service properties.
      */
     public void testServiceDependencyPropagate() {
-        DependencyManager m = new DependencyManager(context);
+        DependencyManager m = getDM();
         // helper class that ensures certain steps get executed in sequence
         Ensure e = new Ensure();
         Component c1 = m.createComponent()
@@ -67,7 +67,7 @@ public class ServiceDependencyPropagateT
      * using a callback method.
      */
     public void testServiceDependencyPropagateCallback() {
-        DependencyManager m = new DependencyManager(context);
+        DependencyManager m = getDM();
         // helper class that ensures certain steps get executed in sequence
         Ensure e = new Ensure();
         Component c1 = m.createComponent()

Modified: felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/ServiceDependencyTest.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/ServiceDependencyTest.java?rev=1620564&r1=1620563&r2=1620564&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/ServiceDependencyTest.java (original)
+++ felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/ServiceDependencyTest.java Tue Aug 26 11:00:21 2014
@@ -24,7 +24,7 @@ import org.apache.felix.dm.DependencyMan
 
 public class ServiceDependencyTest extends TestBase {
     public void testServiceRegistrationAndConsumption() {
-        DependencyManager m = new DependencyManager(context);
+        DependencyManager m = getDM();
         // helper class that ensures certain steps get executed in sequence
         Ensure e = new Ensure();
         // create a service provider and consumer

Modified: felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/ServiceDependencyThroughCallbackInstanceTest.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/ServiceDependencyThroughCallbackInstanceTest.java?rev=1620564&r1=1620563&r2=1620564&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/ServiceDependencyThroughCallbackInstanceTest.java (original)
+++ felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/ServiceDependencyThroughCallbackInstanceTest.java Tue Aug 26 11:00:21 2014
@@ -33,7 +33,7 @@ public class ServiceDependencyThroughCal
     }
 
     private void invokeTest(BundleContext context, int numberOfServices) {
-        DependencyManager m = new DependencyManager(context);
+        DependencyManager m = getDM();
         // create a number of services
 		for (int i = 0; i < numberOfServices; i++) {
 			final int num = i;

Modified: felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/ServiceRaceTest.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/ServiceRaceTest.java?rev=1620564&r1=1620563&r2=1620564&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/ServiceRaceTest.java (original)
+++ felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/ServiceRaceTest.java Tue Aug 26 11:00:21 2014
@@ -25,7 +25,6 @@ import org.osgi.service.cm.Configuration
  */
 public class ServiceRaceTest extends TestBase {
     volatile ConfigurationAdmin m_cm;
-    volatile DependencyManager m_dm;
     final static int STEP_WAIT = 5000;
     final static int DEPENDENCIES = 10;
     final static int LOOPS = 3000;
@@ -46,7 +45,6 @@ public class ServiceRaceTest extends Tes
      * Creates many service dependencies, and activate/deactivate them concurrently.  
      */
     public void testCreateParallelComponentRegistgrationUnregistration() {
-        m_dm = new DependencyManager(context);
         m_dm.add(m_dm.createComponent()
             .setImplementation(this)
             .setCallbacks(null, "start", null, null)

Modified: felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/ServiceUpdateTest.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/ServiceUpdateTest.java?rev=1620564&r1=1620563&r2=1620564&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/ServiceUpdateTest.java (original)
+++ felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/ServiceUpdateTest.java Tue Aug 26 11:00:21 2014
@@ -22,7 +22,7 @@ import org.osgi.framework.ServiceReferen
 
 public class ServiceUpdateTest extends TestBase {
     public void testServiceUpdate() throws Exception {
-        DependencyManager m = new DependencyManager(context);
+        final DependencyManager m = getDM();
         // helper class that ensures certain steps get executed in sequence
         Ensure e = new Ensure();
         // create a resource provider

Modified: felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/TemporalServiceDependencyTest.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/TemporalServiceDependencyTest.java?rev=1620564&r1=1620563&r2=1620564&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/TemporalServiceDependencyTest.java (original)
+++ felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/TemporalServiceDependencyTest.java Tue Aug 26 11:00:21 2014
@@ -10,7 +10,7 @@ import junit.framework.Assert;
 
 public class TemporalServiceDependencyTest extends TestBase {
     public void testServiceConsumptionAndIntermittentAvailability() {
-        DependencyManager m = new DependencyManager(context);
+        final DependencyManager m = getDM();
         // helper class that ensures certain steps get executed in sequence
         Ensure e = new Ensure();
         // create a service provider and consumer
@@ -42,7 +42,7 @@ public class TemporalServiceDependencyTe
     }
 
     public void testServiceConsumptionWithCallbackAndIntermittentAvailability() {
-        DependencyManager m = new DependencyManager(context);
+        final DependencyManager m = getDM();
         // helper class that ensures certain steps get executed in sequence
         Ensure e = new Ensure();
         // create a service provider and consumer
@@ -77,7 +77,7 @@ public class TemporalServiceDependencyTe
     }
 
     public void testFelix4602_PropagateServiceInvocationException() {
-        DependencyManager m = new DependencyManager(context);
+        final DependencyManager m = getDM();
         final Ensure ensure = new Ensure();
         Runnable provider = new Runnable() {
         	public void run() {

Modified: felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/TestBase.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/TestBase.java?rev=1620564&r1=1620563&r2=1620564&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/TestBase.java (original)
+++ felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm.itest/src/org/apache/felix/dm/itest/TestBase.java Tue Aug 26 11:00:21 2014
@@ -4,12 +4,18 @@ import java.io.PrintWriter;
 import java.io.StringWriter;
 import java.util.Hashtable;
 import java.util.List;
+import java.util.Properties;
+import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.Executor;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
+import java.util.concurrent.TimeUnit;
 
 import junit.framework.TestCase;
 
+import org.apache.felix.dm.Component;
+import org.apache.felix.dm.ComponentState;
+import org.apache.felix.dm.ComponentStateListener;
 import org.apache.felix.dm.DependencyManager;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleContext;
@@ -30,30 +36,29 @@ public abstract class TestBase extends T
     
     // optional thread pool used by parallel dependency managers
     private final static ExecutorService m_threadPool = Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors());
-    private boolean m_useThreadPool = false;
-    
-    // By default, we clear all dependendency managers when a test is done. Overriden by runtime tests, 
-    // where we must not clear managers created by the runtime itself.
-    protected final boolean m_autoClearDependencyManagers;
     
+    // flag used to check if the threadpool must be used for a given test.
+    private boolean m_parallel;
+        
     // Flag used to check if some errors have been logged during the execution of a given test.
     private volatile boolean m_errorsLogged;
 
     // We implement OSGI log service.
     protected ServiceRegistration logService;
     
+    // Our bundle context
     protected BundleContext context;
-    
+
+    // Our dependency manager used to create test components.
+    protected volatile DependencyManager m_dm;
+
+    private ServiceRegistration m_threadPoolRegistration;
+        
     public TestBase() {
-        this(true);
     }
        
-    public TestBase(boolean autoClearDependencyManagers) {
-        m_autoClearDependencyManagers = autoClearDependencyManagers;
-    }
-    
-    protected void setParallel(boolean parallel) {
-        m_useThreadPool = parallel;
+    protected void setParallel() {
+        m_parallel = true;
     }
     
     public void setUp() throws Exception {
@@ -61,31 +66,35 @@ public abstract class TestBase extends T
     	context = FrameworkUtil.getBundle(this.getClass()).getBundleContext();
         logService = context.registerService(LogService.class.getName(), this, null);
         context.addFrameworkListener(this);
+        m_dm = new DependencyManager(context);
+        if (m_parallel) {
+            warn("Registering threadpool ...");
+            Properties props = new Properties();
+            props.put("target", DependencyManager.THREADPOOL);
+            m_threadPoolRegistration = context.registerService(Executor.class.getName(), m_threadPool, props);
+        }
     }
     
     public void tearDown() throws Exception {
     	warn("Tearing down test " + getClass().getName());
     	logService.unregister();
     	context.removeFrameworkListener(this);
-    	if (m_autoClearDependencyManagers) {
-    	    clearAllManagers();
+    	clearComponents();
+    	if (m_parallel) {
+            warn("Unregistering threadpool ...");
+    	    m_threadPoolRegistration.unregister();
     	}
     }
-    
+        
     protected DependencyManager getDM() {
-        DependencyManager dm = new DependencyManager(context);
-        if (m_useThreadPool) {        
-            dm.setThreadPool(m_threadPool);
-        }
-        return dm;
+        return m_dm;
     }
-    
-    protected void clearAllManagers() {
-        // clear all dependency managers
-        List<DependencyManager> list = DependencyManager.getDependencyManagers();
-        for (DependencyManager m : list) {
-            m.clear();
-        }    
+                
+    protected void clearComponents() throws InterruptedException {
+        List<Component> list = m_dm.getComponents();
+        int count = list.size();
+        m_dm.clear(); // can be asynchronous if test is running in parallel.
+        warn("All component cleared (" + count + ")");
     }
 
     /**



Mime
View raw message