You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by gr...@apache.org on 2015/02/24 21:54:24 UTC

[01/10] incubator-usergrid git commit: Move back to Guava 14.0.1 to enable JClouds to work properly, plus changes to Arquillian setup.

Repository: incubator-usergrid
Updated Branches:
  refs/heads/USERGRID-409 08c1f1d08 -> 53e73fbef


Move back to Guava 14.0.1 to enable JClouds to work properly, plus changes to Arquillian setup.


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

Branch: refs/heads/USERGRID-409
Commit: 93b133b51ff2c14a2c62a55b03754068817eb5b9
Parents: 13da256
Author: Dave Johnson <dm...@apigee.com>
Authored: Mon Feb 23 15:45:22 2015 -0500
Committer: Dave Johnson <dm...@apigee.com>
Committed: Mon Feb 23 15:45:22 2015 -0500

----------------------------------------------------------------------
 .../batch/job/AbstractSchedulerRuntimeIT.java   |  3 +-
 stack/corepersistence/pom.xml                   |  4 +--
 stack/pom.xml                                   |  6 ++--
 stack/rest/README.md                            | 13 +++-----
 stack/rest/pom.xml                              | 32 ++++++++------------
 .../usergrid/rest/JobServiceBoostrap.java       |  3 +-
 .../apache/usergrid/rest/AbstractRestIT.java    | 18 +++++------
 .../rest/management/ImportResourceIT.java       |  3 +-
 .../management/export/ExportServiceIT.java      |  3 +-
 .../management/importer/ImportCollectionIT.java |  3 +-
 .../management/importer/ImportServiceIT.java    |  3 +-
 11 files changed, 38 insertions(+), 53 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/93b133b5/stack/core/src/test/java/org/apache/usergrid/batch/job/AbstractSchedulerRuntimeIT.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/batch/job/AbstractSchedulerRuntimeIT.java b/stack/core/src/test/java/org/apache/usergrid/batch/job/AbstractSchedulerRuntimeIT.java
index 534689c..8825497 100644
--- a/stack/core/src/test/java/org/apache/usergrid/batch/job/AbstractSchedulerRuntimeIT.java
+++ b/stack/core/src/test/java/org/apache/usergrid/batch/job/AbstractSchedulerRuntimeIT.java
@@ -96,8 +96,7 @@ public class AbstractSchedulerRuntimeIT {
         JobSchedulerService jobScheduler = springResource.getBean( JobSchedulerService.class );
         jobScheduler.setJobListener( listener );
         if ( jobScheduler.state() != State.RUNNING ) {
-            jobScheduler.startAsync();
-            jobScheduler.awaitRunning();
+            jobScheduler.startAndWait();
         }
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/93b133b5/stack/corepersistence/pom.xml
----------------------------------------------------------------------
diff --git a/stack/corepersistence/pom.xml b/stack/corepersistence/pom.xml
index c89e62f..e7da11f 100644
--- a/stack/corepersistence/pom.xml
+++ b/stack/corepersistence/pom.xml
@@ -61,8 +61,8 @@ limitations under the License.
         <commons.lang.version>3.1</commons.lang.version>
         <elasticsearch.version>1.3.2</elasticsearch.version>
         <fasterxml-uuid.version>3.1.3</fasterxml-uuid.version>
-        <guava.version>18.0</guava.version>
-        <guice.version>4.0-beta5</guice.version>
+        <guava.version>14.0.1</guava.version>
+        <guice.version>3.0</guice.version>
         <guicyfig.version>3.2</guicyfig.version>
         <hystrix.version>1.3.16</hystrix.version>
         <jackson-2-version>2.4.1</jackson-2-version>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/93b133b5/stack/pom.xml
----------------------------------------------------------------------
diff --git a/stack/pom.xml b/stack/pom.xml
index 2735366..8545e88 100644
--- a/stack/pom.xml
+++ b/stack/pom.xml
@@ -97,6 +97,7 @@
 
       <amber-version>0.22-incubating</amber-version>
       <cassandra-version>1.2.18</cassandra-version>
+      <guava.version>14.0.1</guava.version>
       <hector-om-version>3.0-03</hector-om-version>
       <hector-version>1.1-4</hector-version>
       <hector-test-version>1.1-4</hector-test-version>
@@ -111,7 +112,7 @@
       <shiro-version>1.2.3</shiro-version>
       <slf4j-version>1.6.1</slf4j-version>
       <snakeyaml-version>1.8</snakeyaml-version>
-      <tomcat-version>7.0.52</tomcat-version>
+      <tomcat-version>7.0.59</tomcat-version>
       <antlr.version>3.4</antlr.version>
       <tika.version>1.4</tika.version>
       <mockito.version>1.10.8</mockito.version>
@@ -818,7 +819,7 @@
       <dependency>
         <groupId>com.google.guava</groupId>
         <artifactId>guava</artifactId>
-        <version>18.0</version>
+        <version>${guava.version}</version>
       </dependency>
 
       <dependency>
@@ -1568,6 +1569,7 @@
 		    <exclude>loadtests/gatling/user-files/request-bodies/**</exclude>
 
                     <!-- other -->
+                    <exclude>**/catalina_base/**</exclude>
                     <exclude>**/m2/**</exclude>
                     <exclude>**/*.asc</exclude>
                     <exclude>**/dummy.txt</exclude>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/93b133b5/stack/rest/README.md
----------------------------------------------------------------------
diff --git a/stack/rest/README.md b/stack/rest/README.md
index bd0034d..94e1f7a 100644
--- a/stack/rest/README.md
+++ b/stack/rest/README.md
@@ -68,14 +68,11 @@ To test, add the following configuration to the TOMCAT_HOME/conf/tomcat-users.xm
 ```xml
 <tomcat-users>
     <role rolename="manager-gui"/>
-    <tomcat-users>
-        <role rolename="manager-gui"/>
-        <role rolename="manager-jmx"/>
-        <role rolename="manager-script"/>
-        <role rolename="manager-status"/>
-       <!-- this username and password is set into src/test/resources/arquillian.xml -->
-        <user username="usergrid" password="testpassword" roles="manager-script, manager-jmx, manager-gui, manager-status"/>
-    </tomcat-users>
+    <role rolename="manager-jmx"/>
+    <role rolename="manager-script"/>
+    <role rolename="manager-status"/>
+    <!-- this username and password is set into src/test/resources/arquillian.xml -->
+    <user username="usergrid" password="testpassword" roles="manager-script, manager-jmx, manager-gui, manager-status"/>
 </tomcat-users>
 ```
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/93b133b5/stack/rest/pom.xml
----------------------------------------------------------------------
diff --git a/stack/rest/pom.xml b/stack/rest/pom.xml
index 0680da2..7746b5d 100644
--- a/stack/rest/pom.xml
+++ b/stack/rest/pom.xml
@@ -32,7 +32,7 @@
     <!-- Override these properties in an active profile within your settings.xml -->
     <properties>
         <usergrid.rest.threads>8</usergrid.rest.threads>
-        <guice.version>4.0-beta5</guice.version>
+        <guice.version>3</guice.version>
         <catalina.host>localhost</catalina.host>
         <catalina.jmx.port>8089</catalina.jmx.port>
     </properties>
@@ -391,7 +391,7 @@
             <scope>test</scope>
         </dependency>
 
-        <!-- arquillian deps -->
+        <!-- Arquillian deps -->
 
         <dependency>
             <groupId>org.codehaus.jackson</groupId>
@@ -400,20 +400,18 @@
             <scope>test</scope>
         </dependency>
 
-
-
         <!--<dependency>-->
-                       <!--<groupId>org.jboss.arquillian.container</groupId>-->
-                       <!--<artifactId>arquillian-tomcat-embedded-7</artifactId>-->
-                       <!--<version>1.1.7.Final</version>-->
-                       <!--<scope>test</scope>-->
-                    <!--</dependency>-->
+            <!--<groupId>org.jboss.arquillian.container</groupId>-->
+            <!--<artifactId>arquillian-tomcat-embedded-7</artifactId>-->
+            <!--<version>1.1.7.Final</version>-->
+            <!--<scope>test</scope>-->
+        <!--</dependency>-->
 
         <dependency>
             <groupId>org.jboss.arquillian</groupId>
             <artifactId>arquillian-bom</artifactId>
             <version>1.1.7.Final</version>
-            <scope>import</scope>
+            <scope>test</scope>
             <type>pom</type>
         </dependency>
 
@@ -424,10 +422,8 @@
             <scope>test</scope>
         </dependency>
 
-
-
-        <!-- Some arquillian dependency runs and old version of guice. We're overridding it here so that we include
-          the right value into the test scope -->
+        <!--Some Arquillian dependency runs and old version of Guice.-->
+        <!--We're overridding it here so that we include the right value into the test scope-->
         <!--<dependency>-->
           <!--<groupId>com.google.inject</groupId>-->
           <!--<artifactId>guice</artifactId>-->
@@ -449,18 +445,14 @@
             <!--<scope>test</scope>-->
         <!--</dependency>-->
 
-
-        <!-- documentation here
-        https://github.com/shrinkwrap/resolver
-        -->
-
+        <!-- documentation here https://github.com/shrinkwrap/resolver -->
         <dependency>
               <groupId>org.jboss.shrinkwrap.resolver</groupId>
               <artifactId>shrinkwrap-resolver-depchain</artifactId>
               <version>2.1.1</version>
               <scope>test</scope>
               <type>pom</type>
-            </dependency>
+        </dependency>
 
         <!--  use the external test client.  Just depend on the maven jetty plugin to launch jetty -->
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/93b133b5/stack/rest/src/main/java/org/apache/usergrid/rest/JobServiceBoostrap.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/main/java/org/apache/usergrid/rest/JobServiceBoostrap.java b/stack/rest/src/main/java/org/apache/usergrid/rest/JobServiceBoostrap.java
index f337659..6d31fac 100644
--- a/stack/rest/src/main/java/org/apache/usergrid/rest/JobServiceBoostrap.java
+++ b/stack/rest/src/main/java/org/apache/usergrid/rest/JobServiceBoostrap.java
@@ -61,8 +61,7 @@ public class JobServiceBoostrap implements
         if ( Boolean.parseBoolean( start ) ) {
             logger.info( "Starting Scheduler Service..." );
             // start the scheduler service
-            schedulerService.startAsync();
-            schedulerService.awaitRunning();
+            schedulerService.startAndWait();
 
         } else {
             logger.info( "Scheduler Service disabled" );

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/93b133b5/stack/rest/src/test/java/org/apache/usergrid/rest/AbstractRestIT.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/AbstractRestIT.java b/stack/rest/src/test/java/org/apache/usergrid/rest/AbstractRestIT.java
index 095c44a..9ce381d 100644
--- a/stack/rest/src/test/java/org/apache/usergrid/rest/AbstractRestIT.java
+++ b/stack/rest/src/test/java/org/apache/usergrid/rest/AbstractRestIT.java
@@ -64,7 +64,6 @@ import org.slf4j.LoggerFactory;
  * following naming convention: test_[HTTP verb]_[action mapping]_[ok|fail][_[specific
  * failure condition if multiple]
  */
-//
 @RunWith( Arquillian.class )
 public abstract class AbstractRestIT extends JerseyTest {
     private static final Logger LOG = LoggerFactory.getLogger( AbstractRestIT.class );
@@ -81,8 +80,8 @@ public abstract class AbstractRestIT extends JerseyTest {
 
     protected static final AppDescriptor descriptor;
 
-    //TODO, this needs removed.  Instead we need to hook into the arquillian event lifecycle
-    //to invoke /system/database/setup from the REST tier.
+    // TODO, this needs to be removed.  Instead we need to hook into the Arquillian event lifecycle
+    // to invoke /system/database/setup from the REST tier.
     public static ITSetup setup = new ITSetup(  );
 
     //private static final URI baseURI = setup.getBaseURI();
@@ -103,18 +102,19 @@ public abstract class AbstractRestIT extends JerseyTest {
     }
 
 
-    //We set testable = false so we deploy the archive to the server and test it locally
+    // We set testable = false so we deploy the archive to the server and test it locally
     @Deployment( testable = false )
     public static WebArchive createTestArchive() {
 
-        //we use the MavenImporter from shrinkwrap to just produce whatever maven would build then test with it
+        // we use the MavenImporter from shrinkwrap to just produce whatever maven would build then test with it
 
-        //set maven to be in offline mode
+        // set maven to be in offline mode
 
         System.setProperty( "org.apache.maven.offline", "true" );
-
-        return ShrinkWrap.create( MavenImporter.class ).loadPomFromFile( "pom.xml", "arquillian-tomcat" )
-                         .importBuildOutput().as( WebArchive.class );
+        return ShrinkWrap.create( MavenImporter.class )
+            .loadPomFromFile( "pom.xml", "arquillian-tomcat" )
+            .importBuildOutput()
+            .as( WebArchive.class );
     }
 
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/93b133b5/stack/rest/src/test/java/org/apache/usergrid/rest/management/ImportResourceIT.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/management/ImportResourceIT.java b/stack/rest/src/test/java/org/apache/usergrid/rest/management/ImportResourceIT.java
index 0b87548..a095afa 100644
--- a/stack/rest/src/test/java/org/apache/usergrid/rest/management/ImportResourceIT.java
+++ b/stack/rest/src/test/java/org/apache/usergrid/rest/management/ImportResourceIT.java
@@ -90,8 +90,7 @@ public class ImportResourceIT extends AbstractRestIT {
         // start the scheduler after we're all set up
         JobSchedulerService jobScheduler = ConcurrentProcessSingleton.getInstance().getSpringResource().getBean( JobSchedulerService.class );
         if (jobScheduler.state() != Service.State.RUNNING) {
-            jobScheduler.startAsync();
-            jobScheduler.awaitRunning();
+            jobScheduler.startAndWait();
         }
 
     }

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/93b133b5/stack/services/src/test/java/org/apache/usergrid/management/export/ExportServiceIT.java
----------------------------------------------------------------------
diff --git a/stack/services/src/test/java/org/apache/usergrid/management/export/ExportServiceIT.java b/stack/services/src/test/java/org/apache/usergrid/management/export/ExportServiceIT.java
index 3a6d8f9..73ce1b1 100644
--- a/stack/services/src/test/java/org/apache/usergrid/management/export/ExportServiceIT.java
+++ b/stack/services/src/test/java/org/apache/usergrid/management/export/ExportServiceIT.java
@@ -105,8 +105,7 @@ public class ExportServiceIT {
 
             JobSchedulerService jobScheduler = ConcurrentProcessSingleton.getInstance().getSpringResource().getBean(JobSchedulerService.class);
             if (jobScheduler.state() != Service.State.RUNNING) {
-                jobScheduler.startAsync();
-                jobScheduler.awaitRunning();
+                jobScheduler.startAndWait();
             }
         } catch ( Exception e ) {
             logger.warn("Ignoring error starting jobScheduler, already started?", e);

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/93b133b5/stack/services/src/test/java/org/apache/usergrid/management/importer/ImportCollectionIT.java
----------------------------------------------------------------------
diff --git a/stack/services/src/test/java/org/apache/usergrid/management/importer/ImportCollectionIT.java b/stack/services/src/test/java/org/apache/usergrid/management/importer/ImportCollectionIT.java
index d10b611..d0a984d 100644
--- a/stack/services/src/test/java/org/apache/usergrid/management/importer/ImportCollectionIT.java
+++ b/stack/services/src/test/java/org/apache/usergrid/management/importer/ImportCollectionIT.java
@@ -114,8 +114,7 @@ public class ImportCollectionIT {
             .getSpringResource().getBean( JobSchedulerService.class );
 
         if ( jobScheduler.state() != Service.State.RUNNING ) {
-            jobScheduler.startAsync();
-            jobScheduler.awaitRunning();
+            jobScheduler.startAndWait();
         }
 
     }

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/93b133b5/stack/services/src/test/java/org/apache/usergrid/management/importer/ImportServiceIT.java
----------------------------------------------------------------------
diff --git a/stack/services/src/test/java/org/apache/usergrid/management/importer/ImportServiceIT.java b/stack/services/src/test/java/org/apache/usergrid/management/importer/ImportServiceIT.java
index 4932ad7..cb64b59 100644
--- a/stack/services/src/test/java/org/apache/usergrid/management/importer/ImportServiceIT.java
+++ b/stack/services/src/test/java/org/apache/usergrid/management/importer/ImportServiceIT.java
@@ -99,8 +99,7 @@ public class ImportServiceIT {
             .getInstance().getSpringResource().getBean( JobSchedulerService.class );
 
         if ( jobScheduler.state() != Service.State.RUNNING ) {
-            jobScheduler.startAsync();
-            jobScheduler.awaitRunning();
+            jobScheduler.startAndWait();
         }
 
         //creates sample test application


[06/10] incubator-usergrid git commit: changes to get REST tests working with Arquillian: - Add setenv.sh to set memory and debug options for Tomcat - Make Arqillian profile active by default - Add shutdown hook to stop job service when Usergrid is under

Posted by gr...@apache.org.
changes to get REST tests working with Arquillian:
- Add setenv.sh to set memory and debug options for Tomcat
- Make Arqillian profile active by default
- Add shutdown hook to stop job service when Usergrid is underplayed


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

Branch: refs/heads/USERGRID-409
Commit: c9198a6c324e9bb159be41ac6cc07efe2a6d4dc2
Parents: 949c22a
Author: Dave Johnson <dm...@apigee.com>
Authored: Tue Feb 24 09:41:45 2015 -0500
Committer: Dave Johnson <dm...@apigee.com>
Committed: Tue Feb 24 09:41:45 2015 -0500

----------------------------------------------------------------------
 stack/rest/catalina_base/bin/setenv.sh          |  9 +++
 stack/rest/pom.xml                              |  3 +-
 .../usergrid/rest/JobServiceBoostrap.java       |  4 +-
 .../apache/usergrid/rest/ShutdownListener.java  | 73 ++++++++++++++++++++
 .../applications/ApplicationsResource.java      |  1 +
 stack/rest/src/main/webapp/WEB-INF/web.xml      | 13 ++--
 6 files changed, 93 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/c9198a6c/stack/rest/catalina_base/bin/setenv.sh
----------------------------------------------------------------------
diff --git a/stack/rest/catalina_base/bin/setenv.sh b/stack/rest/catalina_base/bin/setenv.sh
new file mode 100644
index 0000000..dbcad13
--- /dev/null
+++ b/stack/rest/catalina_base/bin/setenv.sh
@@ -0,0 +1,9 @@
+
+JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.port=8089 "
+JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.ssl=false "
+JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.authenticate=false"
+JAVA_OPTS="$JAVA_OPTS -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8000"
+JAVA_OPTS="$JAVA_OPTS -Xmx4000m -Xms4000m"
+
+CATALINA_PID="$CATALINA_BASE/tomcat.pid"
+

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/c9198a6c/stack/rest/pom.xml
----------------------------------------------------------------------
diff --git a/stack/rest/pom.xml b/stack/rest/pom.xml
index 7746b5d..b3c3663 100644
--- a/stack/rest/pom.xml
+++ b/stack/rest/pom.xml
@@ -45,7 +45,7 @@
             <id>arquillian-tomcat</id>
 
             <activation>
-                <activeByDefault>false</activeByDefault>
+                <activeByDefault>true</activeByDefault>
             </activation>
 
             <dependencies>
@@ -96,6 +96,7 @@
                     <groupId>org.jboss.arquillian.container</groupId>
                     <artifactId>arquillian-tomcat-remote-7</artifactId>
                     <version>1.0.0.CR7</version>
+                    <scope>test</scope>
                 </dependency>
 
             </dependencies>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/c9198a6c/stack/rest/src/main/java/org/apache/usergrid/rest/JobServiceBoostrap.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/main/java/org/apache/usergrid/rest/JobServiceBoostrap.java b/stack/rest/src/main/java/org/apache/usergrid/rest/JobServiceBoostrap.java
index 6d31fac..c6721ea 100644
--- a/stack/rest/src/main/java/org/apache/usergrid/rest/JobServiceBoostrap.java
+++ b/stack/rest/src/main/java/org/apache/usergrid/rest/JobServiceBoostrap.java
@@ -31,13 +31,12 @@ import java.util.Properties;
  * Simple class that starts the job store after the application context has been fired up. We don't
  * want to start the service until all of spring has been initialized in our webapp context
  */
-//@Component( "jobServiceBoostrap" )
 public class JobServiceBoostrap implements
         ApplicationListener<ContextRefreshedEvent> {
 
     private static final Logger logger = LoggerFactory.getLogger( JobServiceBoostrap.class );
 
-    private static final String START_SCHEDULER_PROP = "usergrid.scheduler.enabled";
+    public static final String START_SCHEDULER_PROP = "usergrid.scheduler.enabled";
 
     @Autowired
     private JobSchedulerService schedulerService;
@@ -60,7 +59,6 @@ public class JobServiceBoostrap implements
         String start = properties.getProperty( START_SCHEDULER_PROP, "true" );
         if ( Boolean.parseBoolean( start ) ) {
             logger.info( "Starting Scheduler Service..." );
-            // start the scheduler service
             schedulerService.startAndWait();
 
         } else {

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/c9198a6c/stack/rest/src/main/java/org/apache/usergrid/rest/ShutdownListener.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/main/java/org/apache/usergrid/rest/ShutdownListener.java b/stack/rest/src/main/java/org/apache/usergrid/rest/ShutdownListener.java
new file mode 100644
index 0000000..7b038c2
--- /dev/null
+++ b/stack/rest/src/main/java/org/apache/usergrid/rest/ShutdownListener.java
@@ -0,0 +1,73 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.usergrid.rest;
+
+
+import org.apache.usergrid.batch.service.JobSchedulerService;
+import org.apache.usergrid.batch.service.SchedulerService;
+import org.apache.usergrid.persistence.cassandra.CassandraService;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.ApplicationContextAware;
+import org.springframework.web.context.support.WebApplicationContextUtils;
+
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+import javax.servlet.http.HttpSessionAttributeListener;
+import javax.servlet.http.HttpSessionEvent;
+import javax.servlet.http.HttpSessionListener;
+import javax.servlet.http.HttpSessionBindingEvent;
+import java.util.Properties;
+
+
+/**
+ * Shutdown job service when context is destroyed (useful when testing).
+ */
+public class ShutdownListener implements ServletContextListener {
+    private static final Logger logger = LoggerFactory.getLogger(ShutdownListener.class);
+    JobSchedulerService schedulerService;
+    Properties properties;
+
+    public ShutdownListener() {
+    }
+
+    public void contextInitialized(ServletContextEvent sce) {
+
+        ApplicationContext ctx = WebApplicationContextUtils
+            .getWebApplicationContext(sce.getServletContext());
+
+        schedulerService = ctx.getBean( JobSchedulerService.class );
+        properties = (Properties)ctx.getBean("properties");
+
+        logger.info("ShutdownListener initialized");
+    }
+
+    public void contextDestroyed(ServletContextEvent sce) {
+
+        logger.info("ShutdownListener invoked");
+
+        boolean started = Boolean.parseBoolean(
+            properties.getProperty(JobServiceBoostrap.START_SCHEDULER_PROP, "true"));
+
+        if ( started ) {
+            schedulerService.stopAndWait();
+            logger.info( "Stopping Scheduler Service..." );
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/c9198a6c/stack/rest/src/main/java/org/apache/usergrid/rest/management/organizations/applications/ApplicationsResource.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/main/java/org/apache/usergrid/rest/management/organizations/applications/ApplicationsResource.java b/stack/rest/src/main/java/org/apache/usergrid/rest/management/organizations/applications/ApplicationsResource.java
index 56d2f98..0c8ee06 100644
--- a/stack/rest/src/main/java/org/apache/usergrid/rest/management/organizations/applications/ApplicationsResource.java
+++ b/stack/rest/src/main/java/org/apache/usergrid/rest/management/organizations/applications/ApplicationsResource.java
@@ -142,6 +142,7 @@ public class ApplicationsResource extends AbstractContextResource {
 
     @RequireOrganizationAccess
     @Path(RootResource.APPLICATION_ID_PATH)
+    @PUT
     public ApplicationResource restoreApplicationFromOrganizationByApplicationId(
         @Context UriInfo ui,
         @PathParam( "applicationId" )

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/c9198a6c/stack/rest/src/main/webapp/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/stack/rest/src/main/webapp/WEB-INF/web.xml b/stack/rest/src/main/webapp/WEB-INF/web.xml
index 24a82ca..23c0751 100644
--- a/stack/rest/src/main/webapp/WEB-INF/web.xml
+++ b/stack/rest/src/main/webapp/WEB-INF/web.xml
@@ -27,11 +27,15 @@
     <listener>
         <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
     </listener>
-  
+
     <listener>
         <listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
     </listener>
 
+    <listener>
+        <listener-class>org.apache.usergrid.rest.ShutdownListener</listener-class>
+    </listener>
+
     <filter>
         <filter-name>swaggerFilter</filter-name>
         <filter-class>org.apache.usergrid.rest.SwaggerServlet</filter-class>
@@ -59,7 +63,7 @@
         <filter-name>contentTypeFilter</filter-name>
         <url-pattern>/*</url-pattern>
     </filter-mapping>
-    
+
     <filter>
         <filter-name>shiroFilter</filter-name>
         <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
@@ -72,7 +76,7 @@
         <filter-name>shiroFilter</filter-name>
         <url-pattern>/*</url-pattern>
     </filter-mapping>
-	
+
     <filter>
         <filter-name>Usergrid REST API Server</filter-name>
         <filter-class>com.sun.jersey.spi.spring.container.servlet.SpringServlet</filter-class>
@@ -126,7 +130,4 @@
         </taglib>
     </jsp-config>
 
-
-
-
 </web-app>


[09/10] incubator-usergrid git commit: Merge branch 'USERGRID-273' of https://git-wip-us.apache.org/repos/asf/incubator-usergrid into USERGRID-273

Posted by gr...@apache.org.
Merge branch 'USERGRID-273' of https://git-wip-us.apache.org/repos/asf/incubator-usergrid into USERGRID-273

Conflicts:
	stack/rest/pom.xml


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

Branch: refs/heads/USERGRID-409
Commit: 99d694b87ed85b515ac77f929eee034e92ac4560
Parents: ec8e666 b82999e
Author: Dave Johnson <dm...@apigee.com>
Authored: Tue Feb 24 15:17:18 2015 -0500
Committer: Dave Johnson <dm...@apigee.com>
Committed: Tue Feb 24 15:17:18 2015 -0500

----------------------------------------------------------------------

----------------------------------------------------------------------



[10/10] incubator-usergrid git commit: Merge branch 'USERGRID-273' of https://git-wip-us.apache.org/repos/asf/incubator-usergrid into USERGRID-409

Posted by gr...@apache.org.
Merge branch 'USERGRID-273' of https://git-wip-us.apache.org/repos/asf/incubator-usergrid into USERGRID-409

# By Dave Johnson
# Via Dave Johnson
* 'USERGRID-273' of https://git-wip-us.apache.org/repos/asf/incubator-usergrid:
  Effort to use arquillian-suite-extension
  Adding some JVM options to help with the OOM PermGen problems, and removing all tests from except for one (for now)
  changes to get REST tests working with Arquillian: - Add setenv.sh to set memory and debug options for Tomcat - Make Arqillian profile active by default - Add shutdown hook to stop job service when Usergrid is underplayed


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

Branch: refs/heads/USERGRID-409
Commit: 53e73fbeffe8dbe956ed2500918abc6332ef0fbc
Parents: 07755c1 99d694b
Author: grey <gr...@apigee.com>
Authored: Tue Feb 24 12:28:07 2015 -0800
Committer: grey <gr...@apigee.com>
Committed: Tue Feb 24 12:28:07 2015 -0800

----------------------------------------------------------------------
 stack/rest/catalina_base/bin/setenv.sh          |  8 +++
 stack/rest/pom.xml                              | 67 +++++++-----------
 .../usergrid/rest/JobServiceBoostrap.java       |  4 +-
 .../apache/usergrid/rest/ShutdownListener.java  | 73 ++++++++++++++++++++
 .../applications/ApplicationsResource.java      |  1 +
 stack/rest/src/main/webapp/WEB-INF/web.xml      | 13 ++--
 .../apache/usergrid/rest/AbstractRestIT.java    |  7 +-
 .../java/org/apache/usergrid/rest/BasicIT.java  |  5 +-
 stack/rest/src/test/resources/arquillian.xml    | 14 +---
 9 files changed, 123 insertions(+), 69 deletions(-)
----------------------------------------------------------------------



[03/10] incubator-usergrid git commit: Not needed in git.

Posted by gr...@apache.org.
Not needed in git.


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

Branch: refs/heads/USERGRID-409
Commit: 949c22a043728e4c329c38c985641ad148148378
Parents: 2d2bdae
Author: Dave Johnson <dm...@apigee.com>
Authored: Mon Feb 23 16:59:14 2015 -0500
Committer: Dave Johnson <dm...@apigee.com>
Committed: Mon Feb 23 16:59:14 2015 -0500

----------------------------------------------------------------------
 stack/rest/catalina_base/webapps/ROOT | 1 -
 1 file changed, 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/949c22a0/stack/rest/catalina_base/webapps/ROOT
----------------------------------------------------------------------
diff --git a/stack/rest/catalina_base/webapps/ROOT b/stack/rest/catalina_base/webapps/ROOT
deleted file mode 120000
index e92f674..0000000
--- a/stack/rest/catalina_base/webapps/ROOT
+++ /dev/null
@@ -1 +0,0 @@
-../../target/ROOT
\ No newline at end of file


[02/10] incubator-usergrid git commit: Don't run two schedulers.

Posted by gr...@apache.org.
Don't run two schedulers.


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

Branch: refs/heads/USERGRID-409
Commit: 2d2bdae3812606ea649a4470ddd9a69863baf22d
Parents: 93b133b
Author: Dave Johnson <dm...@apigee.com>
Authored: Mon Feb 23 16:46:21 2015 -0500
Committer: Dave Johnson <dm...@apigee.com>
Committed: Mon Feb 23 16:46:21 2015 -0500

----------------------------------------------------------------------
 .../rest/src/test/resources/usergrid-custom-test.properties  | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2d2bdae3/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 d9688c4..5f7f318 100644
--- a/stack/rest/src/test/resources/usergrid-custom-test.properties
+++ b/stack/rest/src/test/resources/usergrid-custom-test.properties
@@ -12,11 +12,6 @@
 
 # REST module test properties
 
-# 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=200
-
 cassandra.startup=external
 cassandra.timeout=2000
 cassandra.connections=800
@@ -29,6 +24,9 @@ hystrix.threadpool.graph_async.coreSize=1200
 # needed to enable refresh and properties end-points used in tests
 usergrid.test=true
 
+# the scheduled will be started inside the remote Tomcat VM, not in Maven VM
+usergrid.scheduler.enabled=false
+
 # needed for DuplicateNameIT
 collection.stage.transient.timeout=5
 


[08/10] incubator-usergrid git commit: Effort to use arquillian-suite-extension

Posted by gr...@apache.org.
Effort to use arquillian-suite-extension


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

Branch: refs/heads/USERGRID-409
Commit: ec8e66642a4b45d17c0c4ddca96823b642d6f462
Parents: 35bff54
Author: Dave Johnson <dm...@apigee.com>
Authored: Tue Feb 24 15:16:23 2015 -0500
Committer: Dave Johnson <dm...@apigee.com>
Committed: Tue Feb 24 15:16:23 2015 -0500

----------------------------------------------------------------------
 stack/rest/pom.xml                              | 58 +++++---------------
 .../apache/usergrid/rest/AbstractRestIT.java    |  7 ++-
 .../java/org/apache/usergrid/rest/BasicIT.java  |  5 +-
 stack/rest/src/test/resources/arquillian.xml    | 14 +----
 4 files changed, 21 insertions(+), 63 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/ec8e6664/stack/rest/pom.xml
----------------------------------------------------------------------
diff --git a/stack/rest/pom.xml b/stack/rest/pom.xml
index 2959d6c..c1c8ea2 100644
--- a/stack/rest/pom.xml
+++ b/stack/rest/pom.xml
@@ -50,48 +50,6 @@
 
             <dependencies>
 
-                <!--embedded mode-->
-                <!--<dependency>-->
-                   <!--<groupId>org.apache.tomcat.embed</groupId>-->
-                   <!--<artifactId>tomcat-embed-core</artifactId>-->
-                   <!--<version>7.0.59</version>-->
-                   <!--<scope>provided</scope>-->
-                <!--</dependency>-->
-                <!--<dependency>-->
-                   <!--<groupId>org.apache.tomcat.embed</groupId>-->
-                   <!--<artifactId>tomcat-embed-jasper</artifactId>-->
-                   <!--<version>7.0.59</version>-->
-                   <!--<scope>provided</scope>-->
-                <!--</dependency>-->
-                <!--<dependency>-->
-                   <!--<groupId>org.apache.tomcat.embed</groupId>-->
-                   <!--<artifactId>tomcat-embed-logging-juli</artifactId>-->
-                   <!--<version>7.0.59</version>-->
-                   <!--<scope>provided</scope>-->
-                <!--</dependency>-->
-                <!--<dependency>-->
-                   <!--<groupId>org.eclipse.jdt.core.compiler</groupId>-->
-                   <!--<artifactId>ecj</artifactId>-->
-                   <!--<version>3.7</version>-->
-                   <!--<scope>test</scope>-->
-                <!--</dependency>-->
-
-                <!--&lt;!&ndash; Weld servlet for testing CDI injections &ndash;&gt;-->
-           <!--<dependency>-->
-               <!--<groupId>org.jboss.weld.servlet</groupId>-->
-               <!--<artifactId>weld-servlet</artifactId>-->
-               <!--<version>2.2.9.Final</version>-->
-           <!--</dependency>-->
-
-                <!-- managed -->
-                <!--<dependency>-->
-                      <!--<groupId>org.jboss.arquillian.container</groupId>-->
-                      <!--<artifactId>arquillian-tomcat-managed-7</artifactId>-->
-                      <!--<version>1.0.0.CR7</version>-->
-                      <!--<scope>test</scope>-->
-                    <!--</dependency>-->
-
-                <!-- remote -->
                 <dependency>
                     <groupId>org.jboss.arquillian.container</groupId>
                     <artifactId>arquillian-tomcat-remote-7</artifactId>
@@ -99,6 +57,14 @@
                     <scope>test</scope>
                 </dependency>
 
+                <!-- only deploy once during tests -->
+                <dependency>
+                    <groupId>org.eu.ingwar.tools</groupId>
+                    <artifactId>arquillian-suite-extension</artifactId>
+                    <version>1.1.2</version>
+                    <scope>test</scope>
+                </dependency>
+
             </dependencies>
 
 
@@ -152,12 +118,14 @@
                     </argLine>
                     <includes>
 
-                        <!--<include>**/*IT.java</include>-->
-                        <!--<include>**/*Test.java</include>-->
+                        <include>**/*IT.java</include>
+                        <include>**/*Test.java</include>
 
                         <!-- how many tests can we run before Tomcat JVM throws OOM / PermGen exceptions -->
 
-                        <include>**/org/apache/usergrid/rest/BasicIT.java</include>
+                        <!--<include>**/org/apache/usergrid/rest/BasicIT.java</include>-->
+                        <!--<include>**/org/apache/usergrid/rest/PartialUpdateTest.java</include>-->
+                        <!--<include>**/org/apache/usergrid/rest/applications/collection/**/CollectionsResourceIT.java</include>-->
 
                         <!--<include>**/org/apache/usergrid/rest/*IT.java</include>-->
                         <!--<include>**/org/apache/usergrid/rest/*Test.java</include>-->

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/ec8e6664/stack/rest/src/test/java/org/apache/usergrid/rest/AbstractRestIT.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/AbstractRestIT.java b/stack/rest/src/test/java/org/apache/usergrid/rest/AbstractRestIT.java
index 9ce381d..fab1e55 100644
--- a/stack/rest/src/test/java/org/apache/usergrid/rest/AbstractRestIT.java
+++ b/stack/rest/src/test/java/org/apache/usergrid/rest/AbstractRestIT.java
@@ -40,6 +40,7 @@ import org.apache.usergrid.java.client.Client;
 import static org.apache.usergrid.utils.JsonUtils.mapToFormattedJsonString;
 import static org.apache.usergrid.utils.MapUtils.hashMap;
 
+import org.eu.ingwar.tools.arquillian.extension.suite.annotations.ArquillianSuiteDeployment;
 import org.jboss.arquillian.container.test.api.Deployment;
 import org.jboss.arquillian.junit.Arquillian;
 import org.jboss.shrinkwrap.api.Archive;
@@ -64,7 +65,8 @@ import org.slf4j.LoggerFactory;
  * following naming convention: test_[HTTP verb]_[action mapping]_[ok|fail][_[specific
  * failure condition if multiple]
  */
-@RunWith( Arquillian.class )
+@ArquillianSuiteDeployment
+@RunWith(Arquillian.class)
 public abstract class AbstractRestIT extends JerseyTest {
     private static final Logger LOG = LoggerFactory.getLogger( AbstractRestIT.class );
     private static boolean usersSetup = false;
@@ -111,14 +113,13 @@ public abstract class AbstractRestIT extends JerseyTest {
         // set maven to be in offline mode
 
         System.setProperty( "org.apache.maven.offline", "true" );
-        return ShrinkWrap.create( MavenImporter.class )
+        return ShrinkWrap.create(MavenImporter.class)
             .loadPomFromFile( "pom.xml", "arquillian-tomcat" )
             .importBuildOutput()
             .as( WebArchive.class );
     }
 
 
-
     @AfterClass
     public static void teardown() {
         access_token = null;

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/ec8e6664/stack/rest/src/test/java/org/apache/usergrid/rest/BasicIT.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/BasicIT.java b/stack/rest/src/test/java/org/apache/usergrid/rest/BasicIT.java
index f63df78..53b30a4 100644
--- a/stack/rest/src/test/java/org/apache/usergrid/rest/BasicIT.java
+++ b/stack/rest/src/test/java/org/apache/usergrid/rest/BasicIT.java
@@ -24,6 +24,7 @@ import javax.ws.rs.core.MultivaluedMap;
 
 import com.fasterxml.jackson.databind.JsonNode;
 
+import org.eu.ingwar.tools.arquillian.extension.suite.annotations.ArquillianSuiteDeployment;
 import org.junit.Rule;
 import org.junit.Test;
 import org.slf4j.Logger;
@@ -258,7 +259,7 @@ public class BasicIT extends AbstractRestIT {
             err_thrown = true;
         }
         assertTrue( "Error should have been thrown", err_thrown );
-        
+
         // test set app user pin
 
         MultivaluedMap<String, String> formData = new MultivaluedMapImpl();
@@ -270,7 +271,7 @@ public class BasicIT extends AbstractRestIT {
                 .post( String.class, formData ));
 
         refreshIndex(orgName, appName);
-        
+
         node = mapper.readTree( resource()
                 .path( "/"+orgName+"/"+appName+"/token" )
                 .queryParam( "grant_type", "pin" )

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/ec8e6664/stack/rest/src/test/resources/arquillian.xml
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/resources/arquillian.xml b/stack/rest/src/test/resources/arquillian.xml
index 1e6177e..5e5fb6c 100644
--- a/stack/rest/src/test/resources/arquillian.xml
+++ b/stack/rest/src/test/resources/arquillian.xml
@@ -23,19 +23,7 @@
     xmlns="http://jboss.org/schema/arquillian"
     xsi:schemaLocation="http://jboss.org/schema/arquillian http://jboss.org/schema/arquillian/arquillian_1_0.xsd">
 
-    <!--<container qualifier="tomcat" default="true">-->
-        <!--<configuration>-->
-            <!--<property name="bindHttpPort">8080</property>-->
-            <!--<property name="bindAddress">localhost</property>-->
-            <!--<property name="javaVmArguments">-Xmx512m -XX:MaxPermSize=128m</property>-->
-            <!--<property name="catalinaHome">${catalina.home}</property>-->
-            <!--<property name="user">usergrid</property>-->
-            <!--<property name="pass">testpassword</property>-->
-            <!--&lt;!&ndash;This is a workaround for this issue https://issues.jboss.org/browse/ARQ-1814&ndash;&gt;-->
-            <!--<property name="catalinaBase">${catalina.home}</property>-->
-            <!--<property name="allowConnectingToRunningServer">true</property>-->
-        <!--</configuration>-->
-    <!--</container>-->
+    <defaultProtocol type="Servlet 3.0"/>
 
     <container qualifier="tomcat" default="true">
         <configuration>


[04/10] incubator-usergrid git commit: Fixes problem with arquillian configuration and plugin scope

Posted by gr...@apache.org.
Fixes problem with arquillian configuration and plugin scope


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

Branch: refs/heads/USERGRID-409
Commit: b82999e2a35e0be6e5fff853380ba0b22e3b79c9
Parents: 949c22a
Author: Todd Nine <tn...@apigee.com>
Authored: Mon Feb 23 16:14:26 2015 -0700
Committer: Todd Nine <tn...@apigee.com>
Committed: Mon Feb 23 16:14:26 2015 -0700

----------------------------------------------------------------------
 stack/rest/pom.xml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/b82999e2/stack/rest/pom.xml
----------------------------------------------------------------------
diff --git a/stack/rest/pom.xml b/stack/rest/pom.xml
index 7746b5d..b3c3663 100644
--- a/stack/rest/pom.xml
+++ b/stack/rest/pom.xml
@@ -45,7 +45,7 @@
             <id>arquillian-tomcat</id>
 
             <activation>
-                <activeByDefault>false</activeByDefault>
+                <activeByDefault>true</activeByDefault>
             </activation>
 
             <dependencies>
@@ -96,6 +96,7 @@
                     <groupId>org.jboss.arquillian.container</groupId>
                     <artifactId>arquillian-tomcat-remote-7</artifactId>
                     <version>1.0.0.CR7</version>
+                    <scope>test</scope>
                 </dependency>
 
             </dependencies>


[07/10] incubator-usergrid git commit: Adding some JVM options to help with the OOM PermGen problems, and removing all tests from except for one (for now)

Posted by gr...@apache.org.
Adding some JVM options to help with the OOM PermGen problems, and removing all tests from except for one (for now)


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

Branch: refs/heads/USERGRID-409
Commit: 35bff549b0df8147bd7b8ee007c9303a08a06502
Parents: c9198a6
Author: Dave Johnson <dm...@apigee.com>
Authored: Tue Feb 24 10:37:37 2015 -0500
Committer: Dave Johnson <dm...@apigee.com>
Committed: Tue Feb 24 10:37:37 2015 -0500

----------------------------------------------------------------------
 stack/rest/catalina_base/bin/setenv.sh |  3 +--
 stack/rest/pom.xml                     | 19 +++++++++++++++++--
 2 files changed, 18 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/35bff549/stack/rest/catalina_base/bin/setenv.sh
----------------------------------------------------------------------
diff --git a/stack/rest/catalina_base/bin/setenv.sh b/stack/rest/catalina_base/bin/setenv.sh
index dbcad13..ab2f736 100644
--- a/stack/rest/catalina_base/bin/setenv.sh
+++ b/stack/rest/catalina_base/bin/setenv.sh
@@ -3,7 +3,6 @@ JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.port=8089 "
 JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.ssl=false "
 JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.authenticate=false"
 JAVA_OPTS="$JAVA_OPTS -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8000"
-JAVA_OPTS="$JAVA_OPTS -Xmx4000m -Xms4000m"
+JAVA_OPTS="$JAVA_OPTS -Xmx3000m -Xms1000m -XX:MaxPermSize=200m -XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled"
 
 CATALINA_PID="$CATALINA_BASE/tomcat.pid"
-

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/35bff549/stack/rest/pom.xml
----------------------------------------------------------------------
diff --git a/stack/rest/pom.xml b/stack/rest/pom.xml
index b3c3663..2959d6c 100644
--- a/stack/rest/pom.xml
+++ b/stack/rest/pom.xml
@@ -151,8 +151,23 @@
                     <argLine>-Dtest.barrier.timestamp=${maven.build.timestamp} -Dtest.clean.storage=true -Xmx${ug.heapmax} -Xms${ug.heapmin} -Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8 -javaagent:${settings.localRepository}/com/github/stephenc/jamm/0.2.5/jamm-0.2.5.jar ${ug.argline}
                     </argLine>
                     <includes>
-                        <include>**/*IT.java</include>
-                        <include>**/*Test.java</include>
+
+                        <!--<include>**/*IT.java</include>-->
+                        <!--<include>**/*Test.java</include>-->
+
+                        <!-- how many tests can we run before Tomcat JVM throws OOM / PermGen exceptions -->
+
+                        <include>**/org/apache/usergrid/rest/BasicIT.java</include>
+
+                        <!--<include>**/org/apache/usergrid/rest/*IT.java</include>-->
+                        <!--<include>**/org/apache/usergrid/rest/*Test.java</include>-->
+
+                        <!--<include>**/org/apache/usergrid/rest/management/**/*IT.java</include>-->
+                        <!--<include>**/org/apache/usergrid/rest/management/**/*Test.java</include>-->
+
+                        <!--<include>**/org/apache/usergrid/rest/applications/collection/**/*IT.java</include>-->
+                        <!--<include>**/org/apache/usergrid/rest/applications/collection/**/*Test.java</include>-->
+
                     </includes>
 
                 </configuration>


[05/10] incubator-usergrid git commit: Merge branch 'USERGRID-273' of https://git-wip-us.apache.org/repos/asf/incubator-usergrid into USERGRID-409

Posted by gr...@apache.org.
Merge branch 'USERGRID-273' of https://git-wip-us.apache.org/repos/asf/incubator-usergrid into USERGRID-409

# By Dave Johnson (3) and Todd Nine (1)
# Via Todd Nine
* 'USERGRID-273' of https://git-wip-us.apache.org/repos/asf/incubator-usergrid:
  Fixes problem with arquillian configuration and plugin scope
  Not needed in git.
  Don't run two schedulers.
  Move back to Guava 14.0.1 to enable JClouds to work properly, plus changes to Arquillian setup.


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

Branch: refs/heads/USERGRID-409
Commit: 07755c15c0d525f10328384aa9f9ffe0fb8393e7
Parents: 08c1f1d b82999e
Author: grey <gr...@apigee.com>
Authored: Mon Feb 23 18:32:43 2015 -0800
Committer: grey <gr...@apigee.com>
Committed: Mon Feb 23 18:32:43 2015 -0800

----------------------------------------------------------------------
 .../batch/job/AbstractSchedulerRuntimeIT.java   |  3 +-
 stack/corepersistence/pom.xml                   |  4 +--
 stack/pom.xml                                   |  6 ++--
 stack/rest/README.md                            | 13 +++-----
 stack/rest/catalina_base/webapps/ROOT           |  1 -
 stack/rest/pom.xml                              | 35 ++++++++------------
 .../usergrid/rest/JobServiceBoostrap.java       |  3 +-
 .../apache/usergrid/rest/AbstractRestIT.java    | 18 +++++-----
 .../rest/management/ImportResourceIT.java       |  3 +-
 .../resources/usergrid-custom-test.properties   |  8 ++---
 .../management/export/ExportServiceIT.java      |  3 +-
 .../management/importer/ImportCollectionIT.java |  3 +-
 .../management/importer/ImportServiceIT.java    |  3 +-
 13 files changed, 43 insertions(+), 60 deletions(-)
----------------------------------------------------------------------