usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snoopd...@apache.org
Subject [1/2] usergrid git commit: Quick fix for Core tests: ensure lockManager gets initialized.
Date Fri, 03 Jun 2016 16:08:45 GMT
Repository: usergrid
Updated Branches:
  refs/heads/release-2.1.1 e6cf6ed4f -> 66bb5cd49


Quick fix for Core tests: ensure lockManager gets initialized.


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

Branch: refs/heads/release-2.1.1
Commit: 17809acdac0c66725dbcd7ad79b0240e4a7290b0
Parents: e6cf6ed
Author: Dave Johnson <snoopdave@apache.org>
Authored: Fri Jun 3 11:45:13 2016 -0400
Committer: Dave Johnson <snoopdave@apache.org>
Committed: Fri Jun 3 11:45:13 2016 -0400

----------------------------------------------------------------------
 .../org/apache/usergrid/persistence/CoreSchemaManager.java   | 8 +++++++-
 stack/core/src/test/resources/usergrid-test-context.xml      | 1 +
 2 files changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/usergrid/blob/17809acd/stack/core/src/test/java/org/apache/usergrid/persistence/CoreSchemaManager.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/persistence/CoreSchemaManager.java
b/stack/core/src/test/java/org/apache/usergrid/persistence/CoreSchemaManager.java
index c6c2d26..28f2c9f 100644
--- a/stack/core/src/test/java/org/apache/usergrid/persistence/CoreSchemaManager.java
+++ b/stack/core/src/test/java/org/apache/usergrid/persistence/CoreSchemaManager.java
@@ -17,6 +17,7 @@
 package org.apache.usergrid.persistence;
 
 
+import org.apache.usergrid.locking.LockManager;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -37,11 +38,13 @@ public class CoreSchemaManager implements SchemaManager {
 
     private final Setup setup;
     private final Cluster cluster;
+    private final LockManager lockManager;
 
 
-    public CoreSchemaManager( final Setup setup, final Cluster cluster ) {
+    public CoreSchemaManager( final Setup setup, final Cluster cluster, Injector injector
) {
         this.setup = setup;
         this.cluster = cluster;
+        this.lockManager = injector.getInstance( LockManager.class );
     }
 
 
@@ -49,6 +52,7 @@ public class CoreSchemaManager implements SchemaManager {
     public void create() {
         try {
             setup.initSchema();
+            lockManager.setup();
         }
         catch ( Exception ex ) {
             logger.error( "Could not setup usergrid core schema", ex );
@@ -62,6 +66,8 @@ public class CoreSchemaManager implements SchemaManager {
         try {
 
             setup.initSchema();
+            lockManager.setup();
+
             setup.runDataMigration();
             setup.initMgmtApp();
         }

http://git-wip-us.apache.org/repos/asf/usergrid/blob/17809acd/stack/core/src/test/resources/usergrid-test-context.xml
----------------------------------------------------------------------
diff --git a/stack/core/src/test/resources/usergrid-test-context.xml b/stack/core/src/test/resources/usergrid-test-context.xml
index 6b10a7c..5572619 100644
--- a/stack/core/src/test/resources/usergrid-test-context.xml
+++ b/stack/core/src/test/resources/usergrid-test-context.xml
@@ -55,5 +55,6 @@
     <bean id="coreManager" class="org.apache.usergrid.persistence.CoreSchemaManager">
         <constructor-arg ref="setup"/>
         <constructor-arg ref="cassandraCluster"/>
+        <constructor-arg ref="injector"/>
     </bean>
 </beans>


Mime
View raw message