commit | 866f7e4064f31a149f190119e85318752a665edd | [log] [tgz] |
---|---|---|
author | Pierre De Rop <pderop@apache.org> | Mon Nov 18 11:20:07 2013 +0000 |
committer | Pierre De Rop <pderop@apache.org> | Mon Nov 18 11:20:07 2013 +0000 |
tree | 87a03b92da08ce1fcc59633fb715374a5a41cd74 | |
parent | 84bddb71f1efcdc3bae94623a068c12dfaad9e27 [diff] |
Use a more reasonable number of aspects per services. Configure threadpools with 4 threads at minimum, or with all available cores git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1542984 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/dependencymanager/test/src/test/java/org/apache/felix/dm/test/integration/api/AspectRaceTest.java b/dependencymanager/test/src/test/java/org/apache/felix/dm/test/integration/api/AspectRaceTest.java index 784d77d..8199740 100644 --- a/dependencymanager/test/src/test/java/org/apache/felix/dm/test/integration/api/AspectRaceTest.java +++ b/dependencymanager/test/src/test/java/org/apache/felix/dm/test/integration/api/AspectRaceTest.java
@@ -44,13 +44,13 @@ 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