openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r1512895 - /openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/portable/AnnotatedTypeImplTest.java
Date Sun, 11 Aug 2013 09:07:00 GMT
Author: struberg
Date: Sun Aug 11 09:07:00 2013
New Revision: 1512895

URL: http://svn.apache.org/r1512895
Log:
reduce threads to 500 as 1000 will exceed the default nproc size of 1024 on linux default
installations

or you could also ulimit -u 4096, but then we'd need to document this better.

Modified:
    openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/portable/AnnotatedTypeImplTest.java

Modified: openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/portable/AnnotatedTypeImplTest.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/portable/AnnotatedTypeImplTest.java?rev=1512895&r1=1512894&r2=1512895&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/portable/AnnotatedTypeImplTest.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/portable/AnnotatedTypeImplTest.java
Sun Aug 11 09:07:00 2013
@@ -38,13 +38,13 @@ import static org.junit.Assert.assertTru
 public class AnnotatedTypeImplTest
     extends AbstractUnitTest
 {
-    final int threads = 1000;
+    final int NUM_THREADS = 500;
 
-    final CountDownLatch startingLine = new CountDownLatch(threads);
+    final CountDownLatch startingLine = new CountDownLatch(NUM_THREADS);
 
     final CountDownLatch startingPistol = new CountDownLatch(1);
 
-    final CountDownLatch finishLine = new CountDownLatch(threads);
+    final CountDownLatch finishLine = new CountDownLatch(NUM_THREADS);
 
     final AtomicInteger exceptions = new AtomicInteger();
 
@@ -62,7 +62,7 @@ public class AnnotatedTypeImplTest
         final BeanManager beanManager = getBeanManager();
         final AnnotatedType<Colors> annotatedType = beanManager.createAnnotatedType(Colors.class);
 
-        for (int i = 0; i < threads; i++)
+        for (int i = 0; i < NUM_THREADS; i++)
         {
             new Runner(startingLine, startingPistol, exceptions, finishLine, annotatedType)
             {
@@ -91,7 +91,7 @@ public class AnnotatedTypeImplTest
         final BeanManager beanManager = getBeanManager();
         final AnnotatedType<Colors> annotatedType = beanManager.createAnnotatedType(Colors.class);
 
-        for (int i = 0; i < threads; i++)
+        for (int i = 0; i < NUM_THREADS; i++)
         {
             new Runner(startingLine, startingPistol, exceptions, finishLine, annotatedType)
             {
@@ -123,7 +123,7 @@ public class AnnotatedTypeImplTest
         final BeanManager beanManager = getBeanManager();
         final AnnotatedType<Colors> annotatedType = beanManager.createAnnotatedType(Colors.class);
 
-        for (int i = 0; i < threads; i++)
+        for (int i = 0; i < NUM_THREADS; i++)
         {
             new Runner(startingLine, startingPistol, exceptions, finishLine, annotatedType)
             {
@@ -154,7 +154,7 @@ public class AnnotatedTypeImplTest
         final BeanManager beanManager = getBeanManager();
         final AnnotatedType<Colors> annotatedType = beanManager.createAnnotatedType(Colors.class);
 
-        for (int i = 0; i < threads; i++)
+        for (int i = 0; i < NUM_THREADS; i++)
         {
             new Runner(startingLine, startingPistol, exceptions, finishLine, annotatedType)
             {



Mime
View raw message