You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by pd...@apache.org on 2012/10/03 12:22:21 UTC

svn commit: r1393388 - in /felix/trunk/scr/src/test: java/org/apache/felix/scr/integration/components/felix3680/Main.java resources/integration_test_FELIX_3680.xml

Author: pderop
Date: Wed Oct  3 10:22:20 2012
New Revision: 1393388

URL: http://svn.apache.org/viewvc?rev=1393388&view=rev
Log:
Uncommitted previous commit (latches are initialize to 11).
Made static/required all A References.


Modified:
    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/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=1393388&r1=1393387&r2=1393388&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 Wed Oct  3 10:22:20 2012
@@ -79,11 +79,13 @@ public class Main implements Runnable
                         {
                             //_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]);
                             _ctx.disableComponent(_componentNames[i]);
+                            _disabledLatch.countDown();
                         }
                     }
                 });
@@ -169,8 +171,8 @@ public class Main implements Runnable
         while (_running)
         {
             _logService.log(LogService.LOG_WARNING, "Performed " + loop + " tests.");            
-            _enabledLatch = new CountDownLatch(1);
-            _disabledLatch = new CountDownLatch(1);
+            _enabledLatch = new CountDownLatch(11); // 10 to make sure all enable tasks are executed + 1 to make sure Main.bindA has been called
+            _disabledLatch = new CountDownLatch(11); // 10 to make sure all disable tasks are executed + 1 to make sure Main.unbindA has been called
 
             EnableManager manager =
                     new EnableManager(new String[] { "B", "C", "D", "E", "F", "G", "H", "I", "J", "K" });

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=1393388&r1=1393387&r2=1393388&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 Wed Oct  3 10:22:20 2012
@@ -25,10 +25,10 @@
 			bind='bindC' />
 		<reference name='d'
 			interface='org.apache.felix.scr.integration.components.felix3680.D'
-			cardinality='0..n' bind='bindD' policy='dynamic' />
+			bind='bindD' />
 		<reference name='e'
 			interface='org.apache.felix.scr.integration.components.felix3680.E'
-			cardinality='0..n' bind='bindE' policy='dynamic' />
+			bind='bindE' />
 		<reference name='f'
 			interface='org.apache.felix.scr.integration.components.felix3680.F'
 			bind='bindF' />
@@ -115,7 +115,7 @@
 		</service>
 		<reference name='j'
 			interface='org.apache.felix.scr.integration.components.felix3680.J'
-			cardinality='1..n' bind='bindJ' policy='dynamic' />
+			bind='bindJ' />
 	</scr:component>
 
 	<scr:component xmlns:scr='http://www.osgi.org/xmlns/scr/v1.1.0'
@@ -127,7 +127,7 @@
 		</service>
 		<reference name='k'
 			interface='org.apache.felix.scr.integration.components.felix3680.K'
-			cardinality='1..n' bind='bindK' policy='dynamic' />
+			bind='bindK' />
 	</scr:component>
 
 	<scr:component xmlns:scr='http://www.osgi.org/xmlns/scr/v1.0.0'