Author: pderop
Date: Fri Apr  1 08:01:47 2011
New Revision: 1087619

URL: http://svn.apache.org/viewvc?rev=1087619&view=rev
Log:
Temporarily removed tests for the adapter/aspect "changed" callbacks.

Modified:
    
felix/trunk/dependencymanager/test/src/main/java/org/apache/felix/dm/test/bundle/annotation/adapter/AdapterTest.java
    
felix/trunk/dependencymanager/test/src/main/java/org/apache/felix/dm/test/bundle/annotation/aspect/AspectChainTest.java
    
felix/trunk/dependencymanager/test/src/test/java/org/apache/felix/dm/test/annotation/AdapterAnnotationTest.java
    
felix/trunk/dependencymanager/test/src/test/java/org/apache/felix/dm/test/annotation/AspectAnnotationTest.java

Modified: 
felix/trunk/dependencymanager/test/src/main/java/org/apache/felix/dm/test/bundle/annotation/adapter/AdapterTest.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/dependencymanager/test/src/main/java/org/apache/felix/dm/test/bundle/annotation/adapter/AdapterTest.java?rev=1087619&r1=1087618&r2=1087619&view=diff
==============================================================================
--- 
felix/trunk/dependencymanager/test/src/main/java/org/apache/felix/dm/test/bundle/annotation/adapter/AdapterTest.java
 (original)
+++ 
felix/trunk/dependencymanager/test/src/main/java/org/apache/felix/dm/test/bundle/annotation/adapter/AdapterTest.java
 Fri Apr  1 08:01:47 2011
@@ -111,7 +111,6 @@ public class AdapterTest
     @AdapterService(adapteeService = S1.class, 
                     properties={@Property(name="adapter", value="true")},
                     added="bind", 
-                    changed="changed",
                     removed="removed")
     public static class S1ToS3AdapterCallback implements S3
     {
@@ -128,23 +127,18 @@ public class AdapterTest
         
         public void run3()
         {
-            ((S1) m_s1).run(); // s1 will change its properties here
+            ((S1) m_s1).run();
         }
-        
-        void changed(S1 s1)
-        {
-            m_sequencer.step(3);            
-        }
-        
+                
         @Stop
         void stop() 
         {
-            m_sequencer.step(4);            
+            m_sequencer.step(3);            
         }
         
         void removed(S1 s1)
         {
-            m_sequencer.step(5);            
+            m_sequencer.step(4);            
         }
     }
 
@@ -157,22 +151,10 @@ public class AdapterTest
         @ServiceDependency
         protected S2 m_s2;
         
-        // Injected when started
-        ServiceRegistration m_registration;
-
         public void run()
         {
             m_sequencer.step(1);
             m_s2.run2();
-            Thread update = new Thread() {
-                public void run() {
-                    m_registration.setProperties(new Hashtable<String, 
String>() {{ 
-                        put("param1", "value1");
-                        put("param2", "value2");
-                    }});
-                }
-            };
-            update.start();
         }
     }
     

Modified: 
felix/trunk/dependencymanager/test/src/main/java/org/apache/felix/dm/test/bundle/annotation/aspect/AspectChainTest.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/dependencymanager/test/src/main/java/org/apache/felix/dm/test/bundle/annotation/aspect/AspectChainTest.java?rev=1087619&r1=1087618&r2=1087619&view=diff
==============================================================================
--- 
felix/trunk/dependencymanager/test/src/main/java/org/apache/felix/dm/test/bundle/annotation/aspect/AspectChainTest.java
 (original)
+++ 
felix/trunk/dependencymanager/test/src/main/java/org/apache/felix/dm/test/bundle/annotation/aspect/AspectChainTest.java
 Fri Apr  1 08:01:47 2011
@@ -18,8 +18,6 @@
  */
 package org.apache.felix.dm.test.bundle.annotation.aspect;
 
-import java.util.Hashtable;
-
 import org.apache.felix.dm.annotation.api.AspectService;
 import org.apache.felix.dm.annotation.api.Component;
 import org.apache.felix.dm.annotation.api.Destroy;
@@ -43,17 +41,21 @@ public class AspectChainTest
         protected Sequencer m_sequencer;
         // Injected by reflection.
         protected ServiceRegistration m_sr;
-                
+               
+        @Init
+        void init() {
+            System.out.println("ServiceProvider.init");
+        }
+        
+        @Destroy
+        void destroy() {
+            System.out.println("ServiceProvider.destroy");
+        }
+
         public void invoke(Runnable run)
         {
             run.run();
             m_sequencer.step(6);
-            Thread update = new Thread() {
-                public void run() {
-                    m_sr.setProperties(new Hashtable<String, String>() {{ 
put("foo", "bar");}});      
-                }
-            };
-            update.start();
         }
     }
     
@@ -65,6 +67,16 @@ public class AspectChainTest
         // Injected by reflection.
         private volatile ServiceInterface m_parentService;
 
+        @Init
+        void init() {
+            System.out.println("ServiceAspect2.init");
+        }
+        
+        @Destroy
+        void destroy() {
+            System.out.println("ServiceAspect2.destroy");
+        }
+        
         public void invoke(Runnable run)
         {
             m_sequencer.step(3);
@@ -80,6 +92,16 @@ public class AspectChainTest
         // Injected using add callback.
         private volatile ServiceInterface m_parentService;
 
+        @Init
+        void init() {
+            System.out.println("ServiceAspect3.init");
+        }
+        
+        @Destroy
+        void destroy() {
+            System.out.println("ServiceAspect3.destroy");
+        }
+
         void add(ServiceInterface si)
         {
             m_parentService = si;
@@ -92,7 +114,7 @@ public class AspectChainTest
         }
     }
 
-    @AspectService(ranking = 10, added="added", changed="changed", 
removed="removed")
+    @AspectService(ranking = 10, added="added", removed="removed")
     public static class ServiceAspect1 implements ServiceInterface
     {
         @ServiceDependency(filter="(name=AspectChainTest.ServiceAspect1)")
@@ -100,25 +122,30 @@ public class AspectChainTest
         // Injected by reflection.
         private volatile ServiceInterface m_parentService;
 
-        void added(ServiceInterface si)
-        {
-            m_parentService = si;
+        @Init
+        void init() {
+            System.out.println("ServiceAspect1.init");
         }
         
-        void changed(ServiceInterface si)
+        @Destroy
+        void destroy() {
+            System.out.println("ServiceAspect1.destroy");
+        }
+
+        void added(ServiceInterface si)
         {
-            m_sequencer.step(7);
+            m_parentService = si;
         }
-        
+                
         @Stop
         void stop()
         {
-            m_sequencer.step(8);
+            m_sequencer.step(7);
         }
         
         void removed(ServiceInterface si)
         {
-            m_sequencer.step(9);
+            m_sequencer.step(8);
         }
         
         public void invoke(Runnable run)
@@ -142,7 +169,7 @@ public class AspectChainTest
         @Init
         public void init()
         {
-            m_thread = new Thread(this);
+            m_thread = new Thread(this, "ServiceConsumer");
             m_thread.start();
         }
 

Modified: 
felix/trunk/dependencymanager/test/src/test/java/org/apache/felix/dm/test/annotation/AdapterAnnotationTest.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/dependencymanager/test/src/test/java/org/apache/felix/dm/test/annotation/AdapterAnnotationTest.java?rev=1087619&r1=1087618&r2=1087619&view=diff
==============================================================================
--- 
felix/trunk/dependencymanager/test/src/test/java/org/apache/felix/dm/test/annotation/AdapterAnnotationTest.java
 (original)
+++ 
felix/trunk/dependencymanager/test/src/test/java/org/apache/felix/dm/test/annotation/AdapterAnnotationTest.java
 Fri Apr  1 08:01:47 2011
@@ -93,8 +93,8 @@ public class AdapterAnnotationTest exten
         // Provide the Sequencer to the 
org.apache.felix.dm.test.bundle.annotation.adapter.AdapterTest bundle 
         Component sequencer = makeSequencer(m, "AdapterCallback");
         m.add(sequencer);
-        m_ensure.waitForStep(3, 10000);
+        m_ensure.waitForStep(2, 10000);
         m.remove(sequencer);
-        m_ensure.waitForStep(5, 10000);        
+        m_ensure.waitForStep(4, 10000);        
     }
 }

Modified: 
felix/trunk/dependencymanager/test/src/test/java/org/apache/felix/dm/test/annotation/AspectAnnotationTest.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/dependencymanager/test/src/test/java/org/apache/felix/dm/test/annotation/AspectAnnotationTest.java?rev=1087619&r1=1087618&r2=1087619&view=diff
==============================================================================
--- 
felix/trunk/dependencymanager/test/src/test/java/org/apache/felix/dm/test/annotation/AspectAnnotationTest.java
 (original)
+++ 
felix/trunk/dependencymanager/test/src/test/java/org/apache/felix/dm/test/annotation/AspectAnnotationTest.java
 Fri Apr  1 08:01:47 2011
@@ -80,11 +80,11 @@ public class AspectAnnotationTest extend
         m.add(sa1Sequencer);
 
         m_ensure.step();
-        m_ensure.waitForStep(7, 10000);
+        m_ensure.waitForStep(6, 10000);
 
         // Deactivate service provider
         m.remove(spSequencer);
         // Make sure that service aspect 1 has been called in ts removed and 
stop callbacks 
-        m_ensure.waitForStep(9, 10000);
+        m_ensure.waitForStep(8, 10000);
     }    
 }


Reply via email to