usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From toddn...@apache.org
Subject usergrid git commit: Finishes configuration of the serialization
Date Tue, 08 Sep 2015 17:02:50 GMT
Repository: usergrid
Updated Branches:
  refs/heads/USERGRID-909 d75b91d2e -> 0e67f19a6


Finishes configuration of the serialization


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

Branch: refs/heads/USERGRID-909
Commit: 0e67f19a65ab8341dca897681e6e7427f3412106
Parents: d75b91d
Author: Todd Nine <tnine@apigee.com>
Authored: Tue Sep 8 11:02:46 2015 -0600
Committer: Todd Nine <tnine@apigee.com>
Committed: Tue Sep 8 11:02:46 2015 -0600

----------------------------------------------------------------------
 .../persistence/locks/guice/LockModule.java     |  17 +-
 .../locks/impl/CassandraLockManager.java        |   4 +
 .../persistence/locks/impl/LockCandidate.java   |  21 ++-
 .../NodeShardProposalSerializationImpl.java     |   8 +-
 .../NodeShardProposalSerializationTest.java     | 114 -------------
 .../persistence/locks/guice/TestLockModule.java |  38 +++++
 .../NodeShardProposalSerializationTest.java     | 170 +++++++++++++++++++
 .../persistence/locks/impl/TestLockModule.java  |  38 -----
 8 files changed, 246 insertions(+), 164 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/usergrid/blob/0e67f19a/stack/corepersistence/locks/src/main/java/org/apache/usergrid/persistence/locks/guice/LockModule.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/locks/src/main/java/org/apache/usergrid/persistence/locks/guice/LockModule.java
b/stack/corepersistence/locks/src/main/java/org/apache/usergrid/persistence/locks/guice/LockModule.java
index d1e066c..a195612 100644
--- a/stack/corepersistence/locks/src/main/java/org/apache/usergrid/persistence/locks/guice/LockModule.java
+++ b/stack/corepersistence/locks/src/main/java/org/apache/usergrid/persistence/locks/guice/LockModule.java
@@ -20,13 +20,18 @@ package org.apache.usergrid.persistence.locks.guice;
 
 import org.safehaus.guicyfig.GuicyFigModule;
 
+import org.apache.usergrid.persistence.core.migration.schema.Migration;
 import org.apache.usergrid.persistence.locks.LockManager;
 import org.apache.usergrid.persistence.locks.impl.CassandraLockFig;
 import org.apache.usergrid.persistence.locks.impl.CassandraLockManager;
+import org.apache.usergrid.persistence.locks.impl.LockConsistency;
+import org.apache.usergrid.persistence.locks.impl.LockConsistencyImpl;
 import org.apache.usergrid.persistence.locks.impl.NodeShardProposalSerialization;
 import org.apache.usergrid.persistence.locks.impl.NodeShardProposalSerializationImpl;
 
 import com.google.inject.AbstractModule;
+import com.google.inject.Key;
+import com.google.inject.multibindings.Multibinder;
 
 
 /**
@@ -38,11 +43,17 @@ public class LockModule extends AbstractModule {
     protected void configure() {
 
         //install the lock config
-        install(new GuicyFigModule( CassandraLockFig.class ));
+        install( new GuicyFigModule( CassandraLockFig.class ) );
 
         //bind our lockManager
-        bind( LockManager.class).to( CassandraLockManager.class );
+        bind( LockManager.class ).to( CassandraLockManager.class );
 
-        bind( NodeShardProposalSerialization.class).to( NodeShardProposalSerializationImpl.class
);
+        bind( LockConsistency.class ).to( LockConsistencyImpl.class );
+
+        bind( NodeShardProposalSerialization.class ).to( NodeShardProposalSerializationImpl.class
);
+
+        Multibinder<Migration> migrationBinder = Multibinder.newSetBinder( binder(),
Migration.class );
+        //entity serialization versions
+        migrationBinder.addBinding().to( Key.get( NodeShardProposalSerialization.class )
);
     }
 }

http://git-wip-us.apache.org/repos/asf/usergrid/blob/0e67f19a/stack/corepersistence/locks/src/main/java/org/apache/usergrid/persistence/locks/impl/CassandraLockManager.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/locks/src/main/java/org/apache/usergrid/persistence/locks/impl/CassandraLockManager.java
b/stack/corepersistence/locks/src/main/java/org/apache/usergrid/persistence/locks/impl/CassandraLockManager.java
index 61e243e..243ea74 100644
--- a/stack/corepersistence/locks/src/main/java/org/apache/usergrid/persistence/locks/impl/CassandraLockManager.java
+++ b/stack/corepersistence/locks/src/main/java/org/apache/usergrid/persistence/locks/impl/CassandraLockManager.java
@@ -23,16 +23,20 @@ import org.apache.usergrid.persistence.locks.LockId;
 import org.apache.usergrid.persistence.locks.LockManager;
 
 import com.google.common.base.Preconditions;
+import com.google.inject.Inject;
+import com.google.inject.Singleton;
 
 
 /**
  * Create a lock manager that is cassandra based
  */
+@Singleton
 public class CassandraLockManager implements LockManager {
 
     private final NodeShardProposalSerialization nodeShardProposalSerialization;
 
 
+    @Inject
     public CassandraLockManager( final NodeShardProposalSerialization nodeShardProposalSerialization
) {
         this.nodeShardProposalSerialization = nodeShardProposalSerialization;
     }

http://git-wip-us.apache.org/repos/asf/usergrid/blob/0e67f19a/stack/corepersistence/locks/src/main/java/org/apache/usergrid/persistence/locks/impl/LockCandidate.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/locks/src/main/java/org/apache/usergrid/persistence/locks/impl/LockCandidate.java
b/stack/corepersistence/locks/src/main/java/org/apache/usergrid/persistence/locks/impl/LockCandidate.java
index cd0722c..1d90552 100644
--- a/stack/corepersistence/locks/src/main/java/org/apache/usergrid/persistence/locks/impl/LockCandidate.java
+++ b/stack/corepersistence/locks/src/main/java/org/apache/usergrid/persistence/locks/impl/LockCandidate.java
@@ -75,21 +75,26 @@ public class LockCandidate {
 
 
     /**
-     * True if the proposed UUID is the second Id, and we haven't acked the first
-     *
-     * @param proposedUuid
+     * Optionally return the value to ack.  Will be absent if an ack is not required
      * @return
      */
-    public boolean shouldAck(final UUID proposedUuid){
-        //no second, or the second isn't equal to our proposed
+    public Optional<UUID> getValueToAck(final UUID proposedUuid){
+
+         //no second, or the second isn't equal to our proposed
         if(!second.isPresent() || UUIDComparator.staticCompare( proposedUuid, second.get())
!= 0){
-            return false;
+            return Optional.absent();
         }
 
         /**
-         * If our second hasn't acked the first, ack it
+         * If our second has already been acked, it's absent
          */
-        return !secondAcked.isPresent();
+        if(secondAcked.isPresent()){
+            return Optional.absent();
+        }
+
+        //send back the first to ack
+        return Optional.of( first );
+
 
     }
 

http://git-wip-us.apache.org/repos/asf/usergrid/blob/0e67f19a/stack/corepersistence/locks/src/main/java/org/apache/usergrid/persistence/locks/impl/NodeShardProposalSerializationImpl.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/locks/src/main/java/org/apache/usergrid/persistence/locks/impl/NodeShardProposalSerializationImpl.java
b/stack/corepersistence/locks/src/main/java/org/apache/usergrid/persistence/locks/impl/NodeShardProposalSerializationImpl.java
index a28e8e6..ceb60d6 100644
--- a/stack/corepersistence/locks/src/main/java/org/apache/usergrid/persistence/locks/impl/NodeShardProposalSerializationImpl.java
+++ b/stack/corepersistence/locks/src/main/java/org/apache/usergrid/persistence/locks/impl/NodeShardProposalSerializationImpl.java
@@ -34,6 +34,8 @@ import org.apache.usergrid.persistence.locks.LockId;
 import org.apache.usergrid.persistence.model.entity.Id;
 
 import com.google.common.base.Optional;
+import com.google.inject.Inject;
+import com.google.inject.Singleton;
 import com.netflix.astyanax.Keyspace;
 import com.netflix.astyanax.MutationBatch;
 import com.netflix.astyanax.connectionpool.exceptions.ConnectionException;
@@ -45,6 +47,7 @@ import com.netflix.astyanax.serializers.UUIDSerializer;
 /**
  * Serialization of locks
  */
+@Singleton
 public class NodeShardProposalSerializationImpl implements NodeShardProposalSerialization
{
 
     private static final StringRowCompositeSerializer STRING_SER = StringRowCompositeSerializer.get();
@@ -63,6 +66,7 @@ public class NodeShardProposalSerializationImpl implements NodeShardProposalSeri
     protected final LockConsistency lockConsistency;
 
 
+    @Inject
     public NodeShardProposalSerializationImpl( final Keyspace keyspace, final LockConsistency
lockConsistency ) {
         this.keyspace = keyspace;
         this.lockConsistency = lockConsistency;
@@ -133,7 +137,9 @@ public class NodeShardProposalSerializationImpl implements NodeShardProposalSeri
         final ColumnList<UUID> results;
 
         try {
-            results = keyspace.prepareQuery( CF_MULTI_REGION_LOCKS ).getKey( rowKey )
+            results = keyspace.prepareQuery( CF_MULTI_REGION_LOCKS )
+                              .setConsistencyLevel( lockConsistency.getShardReadConsistency()
)
+                              .getKey( rowKey )
                               .withColumnRange( ( UUID ) null, null, false, 2 ).execute().getResult();
         }
         catch ( ConnectionException e ) {

http://git-wip-us.apache.org/repos/asf/usergrid/blob/0e67f19a/stack/corepersistence/locks/src/test/java/org/apache/usergrid/persistence/locks/guice/NodeShardProposalSerializationTest.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/locks/src/test/java/org/apache/usergrid/persistence/locks/guice/NodeShardProposalSerializationTest.java
b/stack/corepersistence/locks/src/test/java/org/apache/usergrid/persistence/locks/guice/NodeShardProposalSerializationTest.java
deleted file mode 100644
index 67b27e8..0000000
--- a/stack/corepersistence/locks/src/test/java/org/apache/usergrid/persistence/locks/guice/NodeShardProposalSerializationTest.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * 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.persistence.locks.guice;
-
-
-import java.util.UUID;
-import java.util.concurrent.atomic.AtomicLong;
-
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.apache.usergrid.persistence.core.guice.MigrationManagerRule;
-import org.apache.usergrid.persistence.core.scope.ApplicationScope;
-import org.apache.usergrid.persistence.core.test.ITRunner;
-import org.apache.usergrid.persistence.core.test.UseModules;
-import org.apache.usergrid.persistence.locks.LockId;
-import org.apache.usergrid.persistence.locks.impl.LockCandidate;
-import org.apache.usergrid.persistence.locks.impl.NodeShardProposalSerialization;
-import org.apache.usergrid.persistence.locks.impl.TestLockModule;
-import org.apache.usergrid.persistence.model.entity.Id;
-import org.apache.usergrid.persistence.model.util.UUIDGenerator;
-
-import com.google.inject.Inject;
-
-import static org.junit.Assert.assertNotNull;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
-
-
-@RunWith(ITRunner.class)
-@UseModules({ TestLockModule.class })
-public class NodeShardProposalSerializationTest {
-
-    private static final Logger log = LoggerFactory.getLogger( NodeShardProposalSerializationTest.class
);
-
-    @Inject
-    @Rule
-    public MigrationManagerRule migrationManagerRule;
-
-
-    @Inject
-    protected NodeShardProposalSerialization serialization;
-
-
-    protected ApplicationScope scope;
-
-    protected final AtomicLong atomicLong = new AtomicLong(  );
-
-
-    private static final int ONE_HOUR_TTL = 360;
-
-    @Before
-    public void setup() {
-        scope = mock( ApplicationScope.class );
-
-        Id orgId = mock( Id.class );
-
-        when( orgId.getType() ).thenReturn( "organization" );
-        when( orgId.getUuid() ).thenReturn( UUIDGenerator.newTimeUUID() );
-
-        when( scope.getApplication() ).thenReturn( orgId );
-
-
-
-
-    }
-
-    @Test
-    public void testOnlyLock(){
-
-        final LockId testId = createLockId();
-        final UUID proposed = UUIDGenerator.newTimeUUID();
-
-
-
-        final LockCandidate candidate =  serialization.writeNewValue( testId, proposed, ONE_HOUR_TTL
);
-
-
-        assertNotNull(candidate);
-
-        assertTrue(proposed, candidate.isFirst(proposed));
-    }
-
-    private LockId createLockId(){
-
-        LockId lockId = mock(LockId.class);
-                 //mock up scope
-                 when( lockId.getApplicationScope()).thenReturn( scope );
-
-                 when( lockId.generateKey()).thenReturn( atomicLong.incrementAndGet() + ""
);
-
-        return lockId;
-
-    }
-}

http://git-wip-us.apache.org/repos/asf/usergrid/blob/0e67f19a/stack/corepersistence/locks/src/test/java/org/apache/usergrid/persistence/locks/guice/TestLockModule.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/locks/src/test/java/org/apache/usergrid/persistence/locks/guice/TestLockModule.java
b/stack/corepersistence/locks/src/test/java/org/apache/usergrid/persistence/locks/guice/TestLockModule.java
new file mode 100644
index 0000000..4910c9a
--- /dev/null
+++ b/stack/corepersistence/locks/src/test/java/org/apache/usergrid/persistence/locks/guice/TestLockModule.java
@@ -0,0 +1,38 @@
+/*
+ * 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.persistence.locks.guice;
+
+
+import org.apache.usergrid.persistence.core.guice.CommonModule;
+import org.apache.usergrid.persistence.core.guice.TestModule;
+import org.apache.usergrid.persistence.locks.guice.LockModule;
+
+
+/**
+ * Wrapper for configuring our guice test env
+ */
+public class TestLockModule extends TestModule {
+
+    @Override
+    protected void configure() {
+        /**
+         * Runtime modules
+         */
+        install( new CommonModule() );
+        install( new LockModule() );
+    }
+}

http://git-wip-us.apache.org/repos/asf/usergrid/blob/0e67f19a/stack/corepersistence/locks/src/test/java/org/apache/usergrid/persistence/locks/impl/NodeShardProposalSerializationTest.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/locks/src/test/java/org/apache/usergrid/persistence/locks/impl/NodeShardProposalSerializationTest.java
b/stack/corepersistence/locks/src/test/java/org/apache/usergrid/persistence/locks/impl/NodeShardProposalSerializationTest.java
new file mode 100644
index 0000000..b33aaac
--- /dev/null
+++ b/stack/corepersistence/locks/src/test/java/org/apache/usergrid/persistence/locks/impl/NodeShardProposalSerializationTest.java
@@ -0,0 +1,170 @@
+/*
+ * 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.persistence.locks.impl;
+
+
+import java.util.UUID;
+import java.util.concurrent.atomic.AtomicLong;
+
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.apache.usergrid.persistence.core.guice.MigrationManagerRule;
+import org.apache.usergrid.persistence.core.scope.ApplicationScope;
+import org.apache.usergrid.persistence.core.test.ITRunner;
+import org.apache.usergrid.persistence.core.test.UseModules;
+import org.apache.usergrid.persistence.locks.LockId;
+import org.apache.usergrid.persistence.locks.guice.TestLockModule;
+import org.apache.usergrid.persistence.model.entity.Id;
+import org.apache.usergrid.persistence.model.util.UUIDGenerator;
+
+import com.google.inject.Inject;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+
+
+@RunWith( ITRunner.class )
+@UseModules( { TestLockModule.class } )
+public class NodeShardProposalSerializationTest {
+
+    private static final Logger log = LoggerFactory.getLogger( NodeShardProposalSerializationTest.class
);
+
+    @Inject
+    @Rule
+    public MigrationManagerRule migrationManagerRule;
+
+
+    @Inject
+    protected NodeShardProposalSerialization serialization;
+
+
+    protected ApplicationScope scope;
+
+    protected final AtomicLong atomicLong = new AtomicLong();
+
+
+    private static final int ONE_HOUR_TTL = 360;
+
+
+    @Before
+    public void setup() {
+        scope = mock( ApplicationScope.class );
+
+        Id orgId = mock( Id.class );
+
+        when( orgId.getType() ).thenReturn( "organization" );
+        when( orgId.getUuid() ).thenReturn( UUIDGenerator.newTimeUUID() );
+
+        when( scope.getApplication() ).thenReturn( orgId );
+    }
+
+
+    @Test
+    public void testOnlyLock() {
+
+        final LockId testId = createLockId();
+        final UUID proposed = UUIDGenerator.newTimeUUID();
+
+
+        final LockCandidate candidate = serialization.writeNewValue( testId, proposed, ONE_HOUR_TTL
);
+
+
+        assertNotNull( candidate );
+
+        assertTrue( "First written value is the only proposal", candidate.isFirst( proposed
) );
+
+        assertTrue( "No second value present", candidate.isLocked( proposed ) );
+        assertFalse( "Should not ack", candidate.getValueToAck( proposed ).isPresent() );
+    }
+
+
+    @Test
+    public void testTwoLocks() {
+
+        final LockId testId = createLockId();
+        final UUID proposedFirst = UUIDGenerator.newTimeUUID();
+
+        final UUID proposedSecond = UUIDGenerator.newTimeUUID();
+
+
+        final LockCandidate candidateFirst = serialization.writeNewValue( testId, proposedFirst,
ONE_HOUR_TTL );
+
+        final LockCandidate candidateSecond = serialization.writeNewValue( testId, proposedSecond,
ONE_HOUR_TTL );
+
+        assertNotNull( candidateFirst );
+
+        assertTrue( "First written value is the only proposal", candidateFirst.isFirst( proposedFirst
) );
+
+        assertTrue( "No second value present", candidateFirst.isLocked( proposedFirst ) );
+
+        assertFalse( "Should not ack", candidateFirst.getValueToAck( proposedFirst ).isPresent()
);
+
+
+        assertNotNull( candidateSecond );
+
+        assertFalse( "Second candidate not present", candidateSecond.isFirst( proposedSecond
) );
+
+        assertFalse( "Second does not have lock", candidateSecond.isLocked( proposedSecond
) );
+
+        assertEquals( "Second should ack", proposedFirst,  candidateSecond.getValueToAck(
proposedSecond ).get() );
+
+
+        //now remove first, second should get lock
+
+        final LockCandidate ackedResponse =
+            serialization.ackProposed( testId, proposedSecond, proposedFirst, ONE_HOUR_TTL
);
+
+
+        //now check if we can lock, still, we should be able to
+
+        assertTrue( "First written value is the only proposal", ackedResponse.isFirst( proposedFirst
) );
+
+        assertTrue( "No second value present", ackedResponse.isLocked( proposedFirst ) );
+
+        assertFalse( "Should not ack", ackedResponse.getValueToAck( proposedFirst ).isPresent()
);
+
+        //
+        assertFalse( "Second candidate is present", ackedResponse.isFirst( proposedSecond
) );
+
+        assertFalse( "Second does not have lock", ackedResponse.isLocked( proposedSecond
) );
+
+        //now we don't need to ack
+        assertFalse( "Second should ack", ackedResponse.getValueToAck( proposedSecond ).isPresent()
);
+    }
+
+
+    private LockId createLockId() {
+
+        LockId lockId = mock( LockId.class );
+        //mock up scope
+        when( lockId.getApplicationScope() ).thenReturn( scope );
+
+        when( lockId.generateKey() ).thenReturn( atomicLong.incrementAndGet() + "" );
+
+        return lockId;
+    }
+}

http://git-wip-us.apache.org/repos/asf/usergrid/blob/0e67f19a/stack/corepersistence/locks/src/test/java/org/apache/usergrid/persistence/locks/impl/TestLockModule.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/locks/src/test/java/org/apache/usergrid/persistence/locks/impl/TestLockModule.java
b/stack/corepersistence/locks/src/test/java/org/apache/usergrid/persistence/locks/impl/TestLockModule.java
deleted file mode 100644
index 3caf3f8..0000000
--- a/stack/corepersistence/locks/src/test/java/org/apache/usergrid/persistence/locks/impl/TestLockModule.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * 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.persistence.locks.impl;
-
-
-import org.apache.usergrid.persistence.core.guice.CommonModule;
-import org.apache.usergrid.persistence.core.guice.TestModule;
-import org.apache.usergrid.persistence.locks.guice.LockModule;
-
-
-/**
- * Wrapper for configuring our guice test env
- */
-public class TestLockModule extends TestModule {
-
-    @Override
-    protected void configure() {
-        /**
-         * Runtime modules
-         */
-        install( new CommonModule() );
-        install( new LockModule() );
-    }
-}


Mime
View raw message