usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snoopd...@apache.org
Subject [4/4] git commit: fixing hard coding of the deployment context environment parameter
Date Wed, 05 Feb 2014 02:20:42 GMT
fixing hard coding of the deployment context environment parameter


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

Branch: refs/heads/two-dot-o
Commit: 4d610b071aef285c0366002f9944e6147cd94531
Parents: 7b71787
Author: Alex Karasulu <akarasulu@gmail.com>
Authored: Wed Feb 5 03:41:15 2014 +0200
Committer: Alex Karasulu <akarasulu@gmail.com>
Committed: Wed Feb 5 03:41:15 2014 +0200

----------------------------------------------------------------------
 stack/corepersistence/collection/pom.xml         | 10 ++++++++++
 .../persistence/collection/guice/TestModule.java | 19 ++++++-------------
 2 files changed, 16 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/4d610b07/stack/corepersistence/collection/pom.xml
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/pom.xml b/stack/corepersistence/collection/pom.xml
index 93aaaea..93b34f7 100644
--- a/stack/corepersistence/collection/pom.xml
+++ b/stack/corepersistence/collection/pom.xml
@@ -43,6 +43,16 @@
     </testResources>
 
     <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <version>2.5</version>
+        <configuration>
+          <environmentVariables>
+            <archaius.deployment.environment>UNIT</archaius.deployment.environment>
+          </environmentVariables>
+        </configuration>
+      </plugin>
 
       <plugin>
         <groupId>org.safehaus.chop</groupId>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/4d610b07/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/guice/TestModule.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/guice/TestModule.java
b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/guice/TestModule.java
index d0bee78..5958f95 100644
--- a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/guice/TestModule.java
+++ b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/guice/TestModule.java
@@ -13,22 +13,15 @@ import com.netflix.config.SimpleDeploymentContext;
  *
  */
 public abstract class TestModule extends AbstractModule {
-
-
     static {
-                  /*
-                    * --------------------------------------------------------------------
-                    * Bootstrap the config for Archaius Configuration Settings.  We don't
want to
-                    * bootstrap more than once per JVM
-                    * --------------------------------------------------------------------
-                    */
+      /*
+       * --------------------------------------------------------------------
+       * Bootstrap the config for Archaius Configuration Settings.  We don't want to
+       * bootstrap more than once per JVM
+       * --------------------------------------------------------------------
+       */
 
         try {
-            //set our deployment context to UNIT so that we load our unit tests
-            SimpleDeploymentContext ctx = new SimpleDeploymentContext();
-            ctx.setDeploymentEnvironment( "UNIT" );
-            ConfigurationManager.setDeploymentContext( ctx );
-
             //load up the properties
             ConfigurationManager.loadCascadedPropertiesFromResources( "usergrid" );
         }


Mime
View raw message