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 2014/02/07 09:59:08 UTC
svn commit: r1565589 -
/felix/sandbox/pderop/dependencymanager/test/src/test/java/org/apache/felix/dm/test/integration/api/ServiceRaceTest.java
Author: pderop
Date: Fri Feb 7 08:59:08 2014
New Revision: 1565589
URL: http://svn.apache.org/r1565589
Log:
Use three services per client. Fixed aspectCount aspectInvocations.
Modified:
felix/sandbox/pderop/dependencymanager/test/src/test/java/org/apache/felix/dm/test/integration/api/ServiceRaceTest.java
Modified: felix/sandbox/pderop/dependencymanager/test/src/test/java/org/apache/felix/dm/test/integration/api/ServiceRaceTest.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager/test/src/test/java/org/apache/felix/dm/test/integration/api/ServiceRaceTest.java?rev=1565589&r1=1565588&r2=1565589&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager/test/src/test/java/org/apache/felix/dm/test/integration/api/ServiceRaceTest.java (original)
+++ felix/sandbox/pderop/dependencymanager/test/src/test/java/org/apache/felix/dm/test/integration/api/ServiceRaceTest.java Fri Feb 7 08:59:08 2014
@@ -52,7 +52,7 @@ import org.osgi.service.cm.Configuration
@RunWith(PaxExam.class)
public class ServiceRaceTest extends TestBase {
final static int STEP_WAIT = 10000;
- final static int SERVICES = 2;
+ final static int SERVICES = 3;
final static int INVOKES = 1;
final static int TESTS = 10000;
@@ -174,8 +174,8 @@ public class ServiceRaceTest extends Tes
info("All services have been properly invoked");
// Now ensure that some random aspects have been randomly invoked.
- int aspectCount = Math.min(1, rnd.nextInt(SERVICES));
- int aspectInvocations = Math.min(1, rnd.nextInt(INVOKES));
+ int aspectCount = Math.max(1, rnd.nextInt(SERVICES));
+ int aspectInvocations = Math.max(1, rnd.nextInt(INVOKES));
aspectsInvoked.waitForStep(aspectCount * aspectInvocations, STEP_WAIT);
info("%d aspects have been properly invoked %d times", aspectCount, aspectInvocations);
@@ -205,7 +205,7 @@ public class ServiceRaceTest extends Tes
for (Configuration aspectConf : aspectPids) {
aspectConf.delete(); // asynchronous
}
-
+
info("removing client");
dm.remove(c);