felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r1402237 - in /felix/trunk/scr/src/test: java/org/apache/felix/scr/integration/ java/org/apache/felix/scr/integration/components/felix3680/ resources/
Date Thu, 25 Oct 2012 18:00:15 GMT
Author: djencks
Date: Thu Oct 25 18:00:14 2012
New Revision: 1402237

URL: http://svn.apache.org/viewvc?rev=1402237&view=rev
Log:
FELIX-3680 use enable/disable counting in test, use restricted logging

Modified:
    felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/Felix3680Test.java
    felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/Felix3680_2Test.java
    felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/components/felix3680/B.java
    felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/components/felix3680/C.java
    felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/components/felix3680/D.java
    felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/components/felix3680/E.java
    felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/components/felix3680/F.java
    felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/components/felix3680/G.java
    felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/components/felix3680/H.java
    felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/components/felix3680/I.java
    felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/components/felix3680/J.java
    felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/components/felix3680/K.java
    felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/components/felix3680/Main.java
    felix/trunk/scr/src/test/resources/integration_test_FELIX_3680.xml

Modified: felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/Felix3680Test.java
URL: http://svn.apache.org/viewvc/felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/Felix3680Test.java?rev=1402237&r1=1402236&r2=1402237&view=diff
==============================================================================
--- felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/Felix3680Test.java (original)
+++ felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/Felix3680Test.java Thu
Oct 25 18:00:14 2012
@@ -41,8 +41,9 @@ public class Felix3680Test extends Compo
         // uncomment to enable debugging of this test class
         //        paxRunnerVmOption = DEBUG_VM_OPTION;
         descriptorFile = "/integration_test_FELIX_3680.xml";
+        restrictedLogging = true;
         //comment to get debug logging if the test fails.
-        DS_LOGLEVEL = "warn";
+//        DS_LOGLEVEL = "warn";
     }
 
     @Inject

Modified: felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/Felix3680_2Test.java
URL: http://svn.apache.org/viewvc/felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/Felix3680_2Test.java?rev=1402237&r1=1402236&r2=1402237&view=diff
==============================================================================
--- felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/Felix3680_2Test.java (original)
+++ felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/Felix3680_2Test.java Thu
Oct 25 18:00:14 2012
@@ -43,7 +43,7 @@ public class Felix3680_2Test extends Com
         
         restrictedLogging = true;
         // Comment this for displaying debug messages
-        DS_LOGLEVEL = "warn";
+//        DS_LOGLEVEL = "warn";
     }
 
     @Inject

Modified: felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/components/felix3680/B.java
URL: http://svn.apache.org/viewvc/felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/components/felix3680/B.java?rev=1402237&r1=1402236&r2=1402237&view=diff
==============================================================================
--- felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/components/felix3680/B.java
(original)
+++ felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/components/felix3680/B.java
Thu Oct 25 18:00:14 2012
@@ -23,11 +23,9 @@ public class B
 {
     void start()
     {
-        Main._enabledLatch.countDown();
     }
 
     void stop()
     {
-        Main._disabledLatch.countDown();
     }
 }

Modified: felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/components/felix3680/C.java
URL: http://svn.apache.org/viewvc/felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/components/felix3680/C.java?rev=1402237&r1=1402236&r2=1402237&view=diff
==============================================================================
--- felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/components/felix3680/C.java
(original)
+++ felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/components/felix3680/C.java
Thu Oct 25 18:00:14 2012
@@ -22,11 +22,9 @@ public class C
 {
     void start()
     {
-        Main._enabledLatch.countDown();
     }
 
     void stop()
     {
-        Main._disabledLatch.countDown();
     }
 }

Modified: felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/components/felix3680/D.java
URL: http://svn.apache.org/viewvc/felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/components/felix3680/D.java?rev=1402237&r1=1402236&r2=1402237&view=diff
==============================================================================
--- felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/components/felix3680/D.java
(original)
+++ felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/components/felix3680/D.java
Thu Oct 25 18:00:14 2012
@@ -22,11 +22,9 @@ public class D
 {
     void start()
     {
-        Main._enabledLatch.countDown();
     }
 
     void stop()
     {
-        Main._disabledLatch.countDown();
     }
 }

Modified: felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/components/felix3680/E.java
URL: http://svn.apache.org/viewvc/felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/components/felix3680/E.java?rev=1402237&r1=1402236&r2=1402237&view=diff
==============================================================================
--- felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/components/felix3680/E.java
(original)
+++ felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/components/felix3680/E.java
Thu Oct 25 18:00:14 2012
@@ -22,11 +22,9 @@ public class E
 {
     void start()
     {
-        Main._enabledLatch.countDown();
     }
 
     void stop()
     {
-        Main._disabledLatch.countDown();
     }
 }

Modified: felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/components/felix3680/F.java
URL: http://svn.apache.org/viewvc/felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/components/felix3680/F.java?rev=1402237&r1=1402236&r2=1402237&view=diff
==============================================================================
--- felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/components/felix3680/F.java
(original)
+++ felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/components/felix3680/F.java
Thu Oct 25 18:00:14 2012
@@ -26,11 +26,9 @@ public class F
 
     void start()
     {
-        Main._enabledLatch.countDown();
     }
 
     void stop()
     {
-        Main._disabledLatch.countDown();
     }
 }

Modified: felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/components/felix3680/G.java
URL: http://svn.apache.org/viewvc/felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/components/felix3680/G.java?rev=1402237&r1=1402236&r2=1402237&view=diff
==============================================================================
--- felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/components/felix3680/G.java
(original)
+++ felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/components/felix3680/G.java
Thu Oct 25 18:00:14 2012
@@ -26,11 +26,9 @@ public class G
 
     void start()
     {
-        Main._enabledLatch.countDown();
     }
 
     void stop()
     {
-        Main._disabledLatch.countDown();
     }
 }

Modified: felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/components/felix3680/H.java
URL: http://svn.apache.org/viewvc/felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/components/felix3680/H.java?rev=1402237&r1=1402236&r2=1402237&view=diff
==============================================================================
--- felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/components/felix3680/H.java
(original)
+++ felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/components/felix3680/H.java
Thu Oct 25 18:00:14 2012
@@ -23,13 +23,12 @@ public class H
     void bindI(I i)
     {
     }
+
     void start()
     {
-        Main._enabledLatch.countDown();
     }
 
     void stop()
     {
-        Main._disabledLatch.countDown();
     }
 }

Modified: felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/components/felix3680/I.java
URL: http://svn.apache.org/viewvc/felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/components/felix3680/I.java?rev=1402237&r1=1402236&r2=1402237&view=diff
==============================================================================
--- felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/components/felix3680/I.java
(original)
+++ felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/components/felix3680/I.java
Thu Oct 25 18:00:14 2012
@@ -23,13 +23,12 @@ public class I
     void bindJ(J j)
     {
     }
+
     void start()
     {
-        Main._enabledLatch.countDown();
     }
 
     void stop()
     {
-        Main._disabledLatch.countDown();
     }
 }

Modified: felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/components/felix3680/J.java
URL: http://svn.apache.org/viewvc/felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/components/felix3680/J.java?rev=1402237&r1=1402236&r2=1402237&view=diff
==============================================================================
--- felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/components/felix3680/J.java
(original)
+++ felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/components/felix3680/J.java
Thu Oct 25 18:00:14 2012
@@ -23,13 +23,12 @@ public class J
     void bindK(K k)
     {
     }
+
     void start()
     {
-        Main._enabledLatch.countDown();
     }
 
     void stop()
     {
-        Main._disabledLatch.countDown();
     }
 }

Modified: felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/components/felix3680/K.java
URL: http://svn.apache.org/viewvc/felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/components/felix3680/K.java?rev=1402237&r1=1402236&r2=1402237&view=diff
==============================================================================
--- felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/components/felix3680/K.java
(original)
+++ felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/components/felix3680/K.java
Thu Oct 25 18:00:14 2012
@@ -22,11 +22,9 @@ public class K
 {
     void start()
     {
-        Main._enabledLatch.countDown();
     }
 
     void stop()
     {
-        Main._disabledLatch.countDown();
     }
 }

Modified: felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/components/felix3680/Main.java
URL: http://svn.apache.org/viewvc/felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/components/felix3680/Main.java?rev=1402237&r1=1402236&r2=1402237&view=diff
==============================================================================
--- felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/components/felix3680/Main.java
(original)
+++ felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/components/felix3680/Main.java
Thu Oct 25 18:00:14 2012
@@ -39,6 +39,9 @@ public class Main implements Runnable
     public static volatile CountDownLatch _enabledLatch;
     public static volatile CountDownLatch _disabledLatch;
 
+    public static volatile CountDownLatch _activatedLatch;
+    public static volatile CountDownLatch _deactivatedLatch;
+
     private volatile ComponentContext _ctx;
     private volatile AtomicInteger _counter = new AtomicInteger();
     private volatile Random _rnd = new Random();
@@ -79,13 +82,15 @@ public class Main implements Runnable
                     {
                         if (enable)
                         {
-                            //_logService.log(LogService.LOG_INFO, "enabling component "
+ _componentNames[i]);
+                            _logService.log(LogService.LOG_INFO, "enabling component " +
_componentNames[i]);
                             _ctx.enableComponent(_componentNames[i]);
+                            _enabledLatch.countDown();
                         }
                         else
                         {
-                            //_logService.log(LogService.LOG_INFO, "disabling component "
+ _componentNames[i]);
+                            _logService.log(LogService.LOG_INFO, "disabling component " +
_componentNames[i]);
                             _ctx.disableComponent(_componentNames[i]);
+                            _disabledLatch.countDown();
                         }
                     }
                 });
@@ -172,7 +177,6 @@ public class Main implements Runnable
         {
             _enabledLatch = new CountDownLatch(11); // for B,C,D,E,F,G,H,I,J,K and Main.bindA()
             _disabledLatch = new CountDownLatch(11); // for B,C,D,E,F,G,H,I,J,K and Main.unbindA()
-
             EnableManager manager =
                     new EnableManager(new String[] { 
                         "org.apache.felix.scr.integration.components.felix3680.B", 

Modified: felix/trunk/scr/src/test/resources/integration_test_FELIX_3680.xml
URL: http://svn.apache.org/viewvc/felix/trunk/scr/src/test/resources/integration_test_FELIX_3680.xml?rev=1402237&r1=1402236&r2=1402237&view=diff
==============================================================================
--- felix/trunk/scr/src/test/resources/integration_test_FELIX_3680.xml (original)
+++ felix/trunk/scr/src/test/resources/integration_test_FELIX_3680.xml Thu Oct 25 18:00:14
2012
@@ -141,7 +141,7 @@
 
 	<scr:component xmlns:scr='http://www.osgi.org/xmlns/scr/v1.1.0'
 		name='org.apache.felix.scr.integration.components.felix3680.Main'
-		activate='start' deactivate='stop'>
+		activate='start' deactivate='stop' enabled="false">
 		<implementation
 			class='org.apache.felix.scr.integration.components.felix3680.Main' />
 		<reference name='a'



Mime
View raw message