You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by to...@apache.org on 2015/02/18 20:20:31 UTC
[1/2] incubator-usergrid git commit: First pass at arquillian remote.
Tomcat will need to be configured.
Repository: incubator-usergrid
Updated Branches:
refs/heads/USERGRID-273 d87577ee6 -> 399d60e77
First pass at arquillian remote. Tomcat will need to be configured.
Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/2ec6407b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/2ec6407b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/2ec6407b
Branch: refs/heads/USERGRID-273
Commit: 2ec6407be4d620f5b570d49452ccadb7d7e50f36
Parents: 3b85da7
Author: Todd Nine <tn...@apigee.com>
Authored: Wed Feb 18 11:18:11 2015 -0800
Committer: Todd Nine <tn...@apigee.com>
Committed: Wed Feb 18 11:18:11 2015 -0800
----------------------------------------------------------------------
stack/rest/README.md | 11 ++++++++++
stack/rest/pom.xml | 17 ++++++++++-----
.../apache/usergrid/rest/AbstractRestIT.java | 9 ++++----
.../test/resource2point0/AbstractRestIT.java | 22 +++++++++++++++++++
stack/rest/src/test/resources/arquillian.xml | 23 +++++++++++++++-----
5 files changed, 68 insertions(+), 14 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2ec6407b/stack/rest/README.md
----------------------------------------------------------------------
diff --git a/stack/rest/README.md b/stack/rest/README.md
index e6016fb..33f9469 100644
--- a/stack/rest/README.md
+++ b/stack/rest/README.md
@@ -82,6 +82,17 @@ To test, add the following configuration to the TOMCAT_HOME/conf/tomcat-users.xm
See the [documentation here](https://docs.jboss.org/author/display/ARQ/Tomcat+7.0+-+Managed) for more setup information.
+Also, you will need to set the runtime to allow JMX deployments. [Add the following](https://docs.jboss.org/author/display/ARQ/Tomcat+7.0+-+Remote) java runtime options to your tomcat instance.
+
+
+```
+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"
+```
+
+
+
Add the following properties to you maven settings.xml
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2ec6407b/stack/rest/pom.xml
----------------------------------------------------------------------
diff --git a/stack/rest/pom.xml b/stack/rest/pom.xml
index d94c9e2..e6113bc 100644
--- a/stack/rest/pom.xml
+++ b/stack/rest/pom.xml
@@ -84,12 +84,19 @@
<!--</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-managed-7</artifactId>
- <version>1.0.0.CR7</version>
- <scope>test</scope>
- </dependency>
+ <groupId>org.jboss.arquillian.container</groupId>
+ <artifactId>arquillian-tomcat-remote-7</artifactId>
+ <version>1.0.0.CR7</version>
+ </dependency>
</dependencies>
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2ec6407b/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 f1536b5..095c44a 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
@@ -81,6 +81,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.
public static ITSetup setup = new ITSetup( );
//private static final URI baseURI = setup.getBaseURI();
@@ -102,7 +104,7 @@ public abstract class AbstractRestIT extends JerseyTest {
//We set testable = false so we deploy the archive to the server and test it locally
- @Deployment(testable = false)
+ @Deployment( testable = false )
public static WebArchive createTestArchive() {
//we use the MavenImporter from shrinkwrap to just produce whatever maven would build then test with it
@@ -111,9 +113,8 @@ public abstract class AbstractRestIT extends JerseyTest {
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/2ec6407b/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/AbstractRestIT.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/AbstractRestIT.java b/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/AbstractRestIT.java
index 78fe11e..cdba34c 100644
--- a/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/AbstractRestIT.java
+++ b/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/AbstractRestIT.java
@@ -21,7 +21,13 @@ import java.net.URI;
import java.net.URLClassLoader;
import java.util.Arrays;
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
+import org.jboss.shrinkwrap.resolver.api.maven.archive.importer.MavenImporter;
import org.junit.Rule;
+import org.junit.runner.RunWith;
import org.apache.usergrid.rest.ITSetup;
import org.apache.usergrid.rest.test.resource2point0.endpoints.ApplicationsResource;
@@ -50,6 +56,7 @@ import static org.junit.Assert.assertEquals;
/**
* How would we get the client from here
*/
+@RunWith( Arquillian.class )
public class AbstractRestIT extends JerseyTest {
private static ClientConfig clientConfig = new DefaultClientConfig();
@@ -78,6 +85,21 @@ public class AbstractRestIT extends JerseyTest {
dumpClasspath( AbstractRestIT.class.getClassLoader() );
}
+
+ //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
+
+ //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 );
+ }
+
public static void dumpClasspath( ClassLoader loader ) {
System.out.println( "Classloader " + loader + ":" );
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2ec6407b/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 49b43f4..d73395e 100644
--- a/stack/rest/src/test/resources/arquillian.xml
+++ b/stack/rest/src/test/resources/arquillian.xml
@@ -29,19 +29,32 @@
<!--</configuration>-->
<!--</container>-->
+ <!--<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>-->
+ <!--<!–This is a workaround for this issue https://issues.jboss.org/browse/ARQ-1814–>-->
+ <!--<property name="catalinaBase">${catalina.home}</property>-->
+ <!--<property name="allowConnectingToRunningServer">true</property>-->
+ <!--</configuration>-->
+ <!--</container>-->
+
+
<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="host">${catalina.host}</property>
<property name="user">usergrid</property>
<property name="pass">testpassword</property>
<!--This is a workaround for this issue https://issues.jboss.org/browse/ARQ-1814-->
<property name="catalinaBase">${catalina.home}</property>
- <property name="allowConnectingToRunningServer">true</property>
+ <property name="jmxPort">${catalina.jmx.port}</property>
</configuration>
</container>
+
</arquillian>
[2/2] incubator-usergrid git commit: Merge branch 'USERGRID-273' of
https://git-wip-us.apache.org/repos/asf/incubator-usergrid into USERGRID-273
Posted by to...@apache.org.
Merge branch 'USERGRID-273' of https://git-wip-us.apache.org/repos/asf/incubator-usergrid into USERGRID-273
Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/399d60e7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/399d60e7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/399d60e7
Branch: refs/heads/USERGRID-273
Commit: 399d60e773f49e91dabe5caaa4e8e7ee218aea8c
Parents: 2ec6407 d87577e
Author: Todd Nine <tn...@apigee.com>
Authored: Wed Feb 18 11:18:19 2015 -0800
Committer: Todd Nine <tn...@apigee.com>
Committed: Wed Feb 18 11:18:19 2015 -0800
----------------------------------------------------------------------
.../src/main/groovy/configure_usergrid.groovy | 2 +-
.../entities/FailedImportEntity.java | 11 +---
.../datagenerators/EntityDataGenerator.scala | 17 +++---
.../datagenerators/FeederGenerator.scala | 24 ++++++++-
.../usergrid/scenarios/EntityScenarios.scala | 20 ++++---
.../org/apache/usergrid/settings/Settings.scala | 2 +
.../PostCustomEntitySimulation.scala | 27 ++++++++--
stack/mongo-emulator/pom.xml | 15 +-----
stack/pom.xml | 47 ++++-------------
.../rest/management/OrganizationsIT.java | 2 +-
.../management/importer/ImportServiceImpl.java | 5 +-
.../usergrid/management/OrganizationIT.java | 30 +++++------
.../importer/FileImportTrackerTest.java | 55 ++++++++------------
.../management/importer/ImportCollectionIT.java | 49 ++++++++++-------
.../services/ApplicationsServiceIT.java | 8 +--
.../usergrid/cassandra/ClearShiroSubject.java | 18 +++++++
16 files changed, 176 insertions(+), 156 deletions(-)
----------------------------------------------------------------------