You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by sf...@apache.org on 2014/08/21 05:31:20 UTC

[2/8] git commit: Make Tomcat threads configurable (in REST tests).

Make Tomcat threads configurable (in REST tests).


Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/f0822b7c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/f0822b7c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/f0822b7c

Branch: refs/heads/two-dot-o-push-notifications
Commit: f0822b7c5b5c473cd43ba40d860809573570c616
Parents: 61b21ec
Author: Dave Johnson <dm...@apigee.com>
Authored: Mon Aug 18 15:59:57 2014 -0400
Committer: Dave Johnson <dm...@apigee.com>
Committed: Mon Aug 18 15:59:57 2014 -0400

----------------------------------------------------------------------
 .../java/org/apache/usergrid/rest/TomcatResource.java   |  4 +++-
 .../src/test/resources/usergrid-custom-test.properties  | 12 ++++++++----
 2 files changed, 11 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/f0822b7c/stack/rest/src/test/java/org/apache/usergrid/rest/TomcatResource.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/TomcatResource.java b/stack/rest/src/test/java/org/apache/usergrid/rest/TomcatResource.java
index 645370b..8f16f8d 100644
--- a/stack/rest/src/test/java/org/apache/usergrid/rest/TomcatResource.java
+++ b/stack/rest/src/test/java/org/apache/usergrid/rest/TomcatResource.java
@@ -191,10 +191,12 @@ public class TomcatResource extends ExternalResource {
 
             port = AvailablePortFinder.getNextAvailable( 9998 + RandomUtils.nextInt(10)  );
 
+            String threads = (String)properties.get("tomcat.threads");
+
             tomcat = new Tomcat();
             tomcat.setBaseDir( dataDir.getAbsolutePath() );
             tomcat.setPort( port );
-            tomcat.getConnector().setAttribute("maxThreads", "1500");
+            tomcat.getConnector().setAttribute("maxThreads", "2000");
             tomcat.addWebapp( "/", new File( getWebAppsPath() ).getAbsolutePath() );
 
             log.info("-----------------------------------------------------------------");

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/f0822b7c/stack/rest/src/test/resources/usergrid-custom-test.properties
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/resources/usergrid-custom-test.properties b/stack/rest/src/test/resources/usergrid-custom-test.properties
index 901952f..d8643b3 100644
--- a/stack/rest/src/test/resources/usergrid-custom-test.properties
+++ b/stack/rest/src/test/resources/usergrid-custom-test.properties
@@ -15,12 +15,16 @@
 # these settings allow tests to run and consistently pass on 16GB MacBook Pro 
 # with ug.heapmax=5000m and ug.heapmin=3000m (set in Maven settings.xml) 
 tomcat.startup=embedded
+tomcat.threads=500
+
 cassandra.startup=forked
+cassandra.timeout=2000
+cassandra.connections=1500
+
 elasticsearch.startup=forked
-cassandra.timeout=5000
-cassandra.connections=600
-hystrix.threadpool.graph_user.coreSize=30
-hystrix.threadpool.graph_async.coreSize=30
+
+hystrix.threadpool.graph_user.coreSize=50
+hystrix.threadpool.graph_async.coreSize=50
 
 # needed to enable refresh and properties end-points used in tests
 usergrid.test=true