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 2013/11/18 12:20:08 UTC
svn commit: r1542984 -
/felix/trunk/dependencymanager/test/src/test/java/org/apache/felix/dm/test/integration/api/AspectRaceTest.java
Author: pderop
Date: Mon Nov 18 11:20:07 2013
New Revision: 1542984
URL: http://svn.apache.org/r1542984
Log:
Use a more reasonable number of aspects per services. Configure threadpools with 4 threads at minimum, or with all available cores
Modified:
felix/trunk/dependencymanager/test/src/test/java/org/apache/felix/dm/test/integration/api/AspectRaceTest.java
Modified: felix/trunk/dependencymanager/test/src/test/java/org/apache/felix/dm/test/integration/api/AspectRaceTest.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/test/src/test/java/org/apache/felix/dm/test/integration/api/AspectRaceTest.java?rev=1542984&r1=1542983&r2=1542984&view=diff
==============================================================================
--- felix/trunk/dependencymanager/test/src/test/java/org/apache/felix/dm/test/integration/api/AspectRaceTest.java (original)
+++ felix/trunk/dependencymanager/test/src/test/java/org/apache/felix/dm/test/integration/api/AspectRaceTest.java Mon Nov 18 11:20:07 2013
@@ -44,13 +44,13 @@ public class AspectRaceTest extends Test
volatile ExecutorService _aspectExec;
volatile DependencyManager _dm;
final static int SERVICES = 3;
- final static int ASPECTS_PER_SERVICE = 10;
+ final static int ASPECTS_PER_SERVICE = 5;
@Test
public void testConcurrentAspects() {
try {
warn("starting aspect race test");
- int cores = 10; // Runtime.getRuntime().availableProcessors();
+ int cores = Math.max(4, Runtime.getRuntime().availableProcessors());
// Used to inject S services
_serviceExec = Executors.newFixedThreadPool(cores);
// Used to inject S Aspects