You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by mr...@apache.org on 2016/07/26 21:17:59 UTC
[20/50] usergrid git commit: Fixes to tests and test properties.
Fixes to tests and test properties.
Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/996bf09f
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/996bf09f
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/996bf09f
Branch: refs/heads/apigee-sso-provider
Commit: 996bf09fbc33bba3c27a26143880ceb100a38936
Parents: db6950b
Author: Dave Johnson <sn...@apache.org>
Authored: Thu Jul 7 12:09:43 2016 -0400
Committer: Dave Johnson <sn...@apache.org>
Committed: Thu Jul 7 12:09:43 2016 -0400
----------------------------------------------------------------------
.../src/test/resources/usergrid-test.properties | 15 ++
.../corepersistence/index/IndexServiceTest.java | 70 ++++---
.../collection/EntityCollectionManagerIT.java | 45 +++--
.../mvcc/stage/delete/MarkCommitTest.java | 3 +-
.../mvcc/stage/write/WriteUniqueVerifyIT.java | 2 +-
.../UniqueValuesServiceDeleteTest.java | 185 +++++++++++++++++++
.../src/test/resources/usergrid.properties | 3 +
.../org/apache/usergrid/rest/UniqueCatsIT.java | 2 +-
.../rest/applications/ApplicationDeleteIT.java | 2 +-
9 files changed, 282 insertions(+), 45 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/usergrid/blob/996bf09f/stack/config/src/test/resources/usergrid-test.properties
----------------------------------------------------------------------
diff --git a/stack/config/src/test/resources/usergrid-test.properties b/stack/config/src/test/resources/usergrid-test.properties
index 29bb332..368c585 100644
--- a/stack/config/src/test/resources/usergrid-test.properties
+++ b/stack/config/src/test/resources/usergrid-test.properties
@@ -83,6 +83,21 @@ usergrid.version.properties=1.0.0
# build number for display
usergrid.version.build=0.1
+
+# --- Start: Usergrid cluster/actor system settings
+
+usergrid.cluster.enabled=true
+usergrid.cluster.hostname=localhost
+usergrid.cluster.region.local=us-east
+usergrid.cluster.region.list=us-east
+usergrid.cluster.seeds=us-east\:localhost
+
+collection.uniquevalues.actors=300
+collection.uniquevalues.authoritative.region=us-east
+
+# --- End: Usergrid cluster/actor system settings
+
+
usergrid.counter.batch.interval=10
#usergrid.auth.token_secret_salt=super secret token value
#usergrid.auth.token_expires_from_last_use=false
http://git-wip-us.apache.org/repos/asf/usergrid/blob/996bf09f/stack/core/src/test/java/org/apache/usergrid/corepersistence/index/IndexServiceTest.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/corepersistence/index/IndexServiceTest.java b/stack/core/src/test/java/org/apache/usergrid/corepersistence/index/IndexServiceTest.java
index dab14ed..fba6e7c 100644
--- a/stack/core/src/test/java/org/apache/usergrid/corepersistence/index/IndexServiceTest.java
+++ b/stack/core/src/test/java/org/apache/usergrid/corepersistence/index/IndexServiceTest.java
@@ -20,62 +20,54 @@
package org.apache.usergrid.corepersistence.index;
-import java.util.List;
-import java.util.Set;
-import java.util.UUID;
-
-import org.apache.usergrid.persistence.graph.MarkedEdge;
-import org.apache.usergrid.persistence.index.impl.IndexProducer;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
+import com.google.inject.Inject;
+import net.jcip.annotations.NotThreadSafe;
import org.apache.usergrid.corepersistence.TestIndexModule;
import org.apache.usergrid.corepersistence.util.CpNamingUtils;
+import org.apache.usergrid.persistence.actorsystem.ActorSystemManager;
import org.apache.usergrid.persistence.collection.EntityCollectionManager;
import org.apache.usergrid.persistence.collection.EntityCollectionManagerFactory;
+import org.apache.usergrid.persistence.collection.uniquevalues.UniqueValueActor;
+import org.apache.usergrid.persistence.collection.uniquevalues.UniqueValuesService;
import org.apache.usergrid.persistence.core.scope.ApplicationScope;
import org.apache.usergrid.persistence.core.scope.ApplicationScopeImpl;
import org.apache.usergrid.persistence.core.test.UseModules;
import org.apache.usergrid.persistence.graph.Edge;
import org.apache.usergrid.persistence.graph.GraphManager;
import org.apache.usergrid.persistence.graph.GraphManagerFactory;
-import org.apache.usergrid.persistence.index.EntityIndex;
-import org.apache.usergrid.persistence.index.CandidateResults;
-import org.apache.usergrid.persistence.index.EntityIndexFactory;
-import org.apache.usergrid.persistence.index.IndexFig;
-import org.apache.usergrid.persistence.index.SearchEdge;
-import org.apache.usergrid.persistence.index.SearchTypes;
+import org.apache.usergrid.persistence.graph.MarkedEdge;
+import org.apache.usergrid.persistence.index.*;
import org.apache.usergrid.persistence.index.impl.EsRunner;
-import org.apache.usergrid.persistence.index.impl.IndexOperationMessage;
import org.apache.usergrid.persistence.index.impl.IndexOperation;
+import org.apache.usergrid.persistence.index.impl.IndexOperationMessage;
+import org.apache.usergrid.persistence.index.impl.IndexProducer;
import org.apache.usergrid.persistence.model.entity.Entity;
import org.apache.usergrid.persistence.model.entity.Id;
import org.apache.usergrid.persistence.model.entity.SimpleId;
import org.apache.usergrid.persistence.model.field.StringField;
import org.apache.usergrid.persistence.model.util.UUIDGenerator;
-
-import com.google.inject.Inject;
-
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
import rx.Observable;
import rx.schedulers.Schedulers;
+import java.util.*;
+
import static org.apache.usergrid.corepersistence.util.CpNamingUtils.createCollectionEdge;
import static org.apache.usergrid.corepersistence.util.CpNamingUtils.getApplicationScope;
import static org.apache.usergrid.persistence.core.util.IdGenerator.createId;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.fail;
+import static org.junit.Assert.*;
@RunWith( EsRunner.class )
@UseModules( { TestIndexModule.class } )
+@NotThreadSafe//anything that changes the system version state is not safe to be run concurrently
public class IndexServiceTest {
@Inject
public IndexService indexService;
-
@Inject
public GraphManagerFactory graphManagerFactory;
@@ -98,12 +90,39 @@ public class IndexServiceTest {
public ApplicationScope applicationScope;
+ @Inject
+ ActorSystemManager actorSystemManager;
+
+ @Inject
+ UniqueValuesService uniqueValuesService;
+
+
+ private static Map<Integer, Boolean> startedAkka = new HashMap<>();
+
+
+ protected synchronized void initAkka(
+ int port, ActorSystemManager actorSystemManager, UniqueValuesService uniqueValuesService ) {
+
+ if ( startedAkka.get(port) == null ) {
+
+ actorSystemManager.registerRouterProducer( uniqueValuesService );
+ actorSystemManager.registerMessageType( UniqueValueActor.Request.class, "/user/uvProxy" );
+ actorSystemManager.registerMessageType( UniqueValueActor.Reservation.class, "/user/uvProxy" );
+ actorSystemManager.registerMessageType( UniqueValueActor.Cancellation.class, "/user/uvProxy" );
+ actorSystemManager.registerMessageType( UniqueValueActor.Confirmation.class, "/user/uvProxy" );
+ actorSystemManager.start( "localhost", port, "us-east" );
+ actorSystemManager.waitForClientActor();
+
+ startedAkka.put( port, true );
+ }
+ }
+
@Before
public void setup() {
applicationScope = getApplicationScope( UUIDGenerator.newTimeUUID() );
-
graphManager = graphManagerFactory.createEdgeManager( applicationScope );
+ initAkka( 2555, actorSystemManager, uniqueValuesService );
}
@@ -140,7 +159,6 @@ public class IndexServiceTest {
@Test( )
public void testSingleCollectionConnection() throws InterruptedException {
-
ApplicationScope applicationScope =
new ApplicationScopeImpl( new SimpleId( UUID.randomUUID(), "application" ) );
http://git-wip-us.apache.org/repos/asf/usergrid/blob/996bf09f/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/EntityCollectionManagerIT.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/EntityCollectionManagerIT.java b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/EntityCollectionManagerIT.java
index ceda1a8..dfff51c 100644
--- a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/EntityCollectionManagerIT.java
+++ b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/EntityCollectionManagerIT.java
@@ -49,6 +49,8 @@ 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 rx.Observable;
import java.util.ArrayList;
@@ -63,6 +65,7 @@ import static org.junit.Assert.*;
@RunWith( ITRunner.class )
@UseModules( TestCollectionModule.class )
public class EntityCollectionManagerIT extends AbstractUniqueValueTest {
+ private static final Logger logger = LoggerFactory.getLogger( EntityCollectionManagerIT.class );
@Inject
private EntityCollectionManagerFactory factory;
@@ -137,7 +140,7 @@ public class EntityCollectionManagerIT extends AbstractUniqueValueTest {
}
catch ( Exception ex ) {
WriteUniqueVerifyException e = ( WriteUniqueVerifyException ) ex;
- assertEquals( 1, e.getVioliations().size() );
+ assertEquals( 1, e.getViolations().size() );
}
}
}
@@ -319,66 +322,78 @@ public class EntityCollectionManagerIT extends AbstractUniqueValueTest {
@Test
public void writeAndGetField2X() throws InterruptedException {
- ApplicationScope collectionScope1 = new ApplicationScopeImpl( new SimpleId( "organization" ) );
+ // create entity with unique testField
+ ApplicationScope collectionScope1 = new ApplicationScopeImpl( new SimpleId( "organization" ) );
final Id entityId = new SimpleId( "test" );
Entity firstInstance = new Entity( entityId );
Field firstField = new StringField( "testField", "unique", true );
firstInstance.setField( firstField );
EntityCollectionManager manager = factory.createCollectionManager( collectionScope1 );
-
Observable<Entity> observable = manager.write( firstInstance, null );
-
Entity createReturned = observable.toBlocking().lastOrDefault( null );
-
assertNotNull( "Id was assigned", createReturned.getId() );
assertNotNull( "Version was assigned", createReturned.getVersion() );
+ // get entity via that unique field, should get correct entity
+
final Id existingId = manager.getIdField( firstInstance.getId().getType(), firstField )
.toBlocking().lastOrDefault( null );
assertNotNull( existingId );
assertEquals( firstInstance.getId(), existingId );
+ // get entity via bogus unique field that does not exist, should get null
+
Field fieldNull = new StringField( "testFieldNotThere", "uniquely", true );
final Id noId = manager.getIdField( firstInstance.getId().getType(), fieldNull )
.toBlocking().lastOrDefault( null );
assertNull( noId );
+ // ensure we clean up
- //ensure we clean up
+ // set a different unique field to the entity we created above
+ // this should effectively remove the original unique testField that we created above
Entity secondInstance = new Entity( entityId );
Field secondField = new StringField( firstField.getName(), "unique2", true );
secondInstance.setField( secondField );
Observable<Entity> observableSecond = manager.write( secondInstance, null );
-
Entity createReturnedSecond = observableSecond.toBlocking().lastOrDefault( null );
-
assertNotNull( "Id was assigned", createReturnedSecond.getId() );
assertNotNull( "Version was assigned", createReturnedSecond.getVersion() );
assertNotEquals( "Versions should not be equal",
createReturned.getVersion(), createReturnedSecond.getVersion() );
- //sanity check, get the entity to ensure it's the right version
+ // sanity check, get the entity to ensure it's the right version
final Entity loadedVersion = manager.load( entityId ).toBlocking().last();
assertEquals(entityId, loadedVersion.getId());
assertEquals(createReturnedSecond.getVersion(), loadedVersion.getVersion());
- //give clean time to run. need to finish the todo below
- Thread.sleep( 2000 );
+ // give clean time to run. need to finish the todo below
- //TODO, we need to implement verify and repair on this
- final Id idFirst = manager.getIdField( firstInstance.getId().getType(), firstField )
- .toBlocking().lastOrDefault( null );
- assertNull(idFirst);
+ Id idFirst = null;
+ int retries = 0;
+ while ( retries++ < 20 ) {
+
+ //TODO, we need to implement verify and repair on this
+ idFirst = manager.getIdField( firstInstance.getId().getType(), firstField )
+ .toBlocking().lastOrDefault( null );
+ if ( idFirst == null ) {
+ break;
+ }
+
+ logger.error("Clean no run yet, waiting ({})", retries);
+ Thread.sleep( 2000 );
+ }
+ assertNull(idFirst);
final Id idSecond = manager.getIdField( secondInstance.getId().getType(), secondField )
.toBlocking().lastOrDefault( null );
http://git-wip-us.apache.org/repos/asf/usergrid/blob/996bf09f/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/mvcc/stage/delete/MarkCommitTest.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/mvcc/stage/delete/MarkCommitTest.java b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/mvcc/stage/delete/MarkCommitTest.java
index a0ee6be..89169ac 100644
--- a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/mvcc/stage/delete/MarkCommitTest.java
+++ b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/mvcc/stage/delete/MarkCommitTest.java
@@ -120,7 +120,8 @@ public class MarkCommitTest extends AbstractMvccEntityStageTest {
.thenReturn( entityMutation );
- new MarkCommit( logStrategy, mvccEntityStrategy, uniqueValueSerializationStrategy, serializationFig, keyspace ).call( event );
+ new MarkCommit( logStrategy, mvccEntityStrategy, uniqueValueSerializationStrategy, serializationFig,
+ null, null, null, keyspace ).call( event );
//TODO: This doesn't assert anything, this needs fixed (should be a fail technically)
}
http://git-wip-us.apache.org/repos/asf/usergrid/blob/996bf09f/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteUniqueVerifyIT.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteUniqueVerifyIT.java b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteUniqueVerifyIT.java
index c70cd1a..401d23e 100644
--- a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteUniqueVerifyIT.java
+++ b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteUniqueVerifyIT.java
@@ -123,7 +123,7 @@ public class WriteUniqueVerifyIT extends AbstractUniqueValueTest {
} catch ( Exception ex ) {
WriteUniqueVerifyException e = (WriteUniqueVerifyException)ex;
- assertTrue( !e.getVioliations().isEmpty() );
+ assertTrue( !e.getViolations().isEmpty() );
}
// ensure we can update original entity without error
http://git-wip-us.apache.org/repos/asf/usergrid/blob/996bf09f/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/uniquevalues/UniqueValuesServiceDeleteTest.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/uniquevalues/UniqueValuesServiceDeleteTest.java b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/uniquevalues/UniqueValuesServiceDeleteTest.java
new file mode 100644
index 0000000..3f58834
--- /dev/null
+++ b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/uniquevalues/UniqueValuesServiceDeleteTest.java
@@ -0,0 +1,185 @@
+/**
+ * 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.collection.uniquevalues;
+
+import com.google.common.collect.ArrayListMultimap;
+import com.google.common.collect.Multimap;
+import com.google.common.collect.Multimaps;
+import com.google.inject.Inject;
+import org.apache.usergrid.persistence.actorsystem.ActorSystemFig;
+import org.apache.usergrid.persistence.actorsystem.ActorSystemManager;
+import org.apache.usergrid.persistence.collection.AbstractUniqueValueTest;
+import org.apache.usergrid.persistence.collection.EntityCollectionManager;
+import org.apache.usergrid.persistence.collection.EntityCollectionManagerFactory;
+import org.apache.usergrid.persistence.collection.exception.WriteUniqueVerifyException;
+import org.apache.usergrid.persistence.collection.guice.TestCollectionModule;
+import org.apache.usergrid.persistence.core.guice.MigrationManagerRule;
+import org.apache.usergrid.persistence.core.scope.ApplicationScope;
+import org.apache.usergrid.persistence.core.scope.ApplicationScopeImpl;
+import org.apache.usergrid.persistence.core.test.ITRunner;
+import org.apache.usergrid.persistence.core.test.UseModules;
+import org.apache.usergrid.persistence.model.entity.Entity;
+import org.apache.usergrid.persistence.model.entity.SimpleId;
+import org.apache.usergrid.persistence.model.field.StringField;
+import org.junit.Assert;
+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 rx.Observable;
+
+import java.util.Collection;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicInteger;
+
+
+/**
+ * Test the unique values service.
+ */
+@RunWith( ITRunner.class )
+@UseModules( TestCollectionModule.class )
+public class UniqueValuesServiceDeleteTest extends AbstractUniqueValueTest {
+ private static final Logger logger = LoggerFactory.getLogger( UniqueValuesServiceDeleteTest.class );
+
+ @Inject
+ private EntityCollectionManagerFactory factory;
+
+ @Inject
+ @Rule
+ public MigrationManagerRule migrationManagerRule;
+
+ @Inject
+ ActorSystemFig actorSystemFig;
+
+ @Inject
+ ActorSystemManager actorSystemManager;
+
+ @Inject
+ UniqueValuesService uniqueValuesService;
+
+
+ int numThreads = 6;
+ int poolSize = 5;
+ int numUsers = 100;
+
+
+ @Before
+ public void initAkka() {
+ // each test class needs unique port number
+ initAkka( 2555, actorSystemManager, uniqueValuesService );
+ }
+
+
+ /**
+ * Use multiple threads to attempt to create entities with duplicate usernames.
+ */
+ @Test
+ public void testDuplicatePrevention() throws Exception {
+
+ initAkka();
+
+ final AtomicInteger successCounter = new AtomicInteger( 0 );
+ final AtomicInteger errorCounter = new AtomicInteger( 0 );
+
+ Multimap<String, Entity> usersCreated =
+ generateDuplicateUsers( numUsers, successCounter, errorCounter );
+
+ int userCount = 0;
+ int usernamesWithDuplicates = 0;
+ for ( String username : usersCreated.keySet() ) {
+ Collection<Entity> users = usersCreated.get( username );
+ if ( users.size() > 1 ) {
+ usernamesWithDuplicates++;
+ }
+ userCount++;
+ }
+
+ Assert.assertEquals( 0, usernamesWithDuplicates );
+
+ Assert.assertEquals( numUsers, successCounter.get() );
+ Assert.assertEquals( 0, errorCounter.get() );
+ Assert.assertEquals( numUsers, usersCreated.size() );
+ Assert.assertEquals( numUsers, userCount );
+ }
+
+
+ private Multimap<String, Entity> generateDuplicateUsers(
+ int numUsers, AtomicInteger successCounter, AtomicInteger errorCounter ) {
+
+ ApplicationScope context = new ApplicationScopeImpl( new SimpleId( "organization" ) );
+
+ EntityCollectionManager manager = factory.createCollectionManager( context );
+
+ Multimap<String, Entity> usersCreated =
+ Multimaps.synchronizedListMultimap( ArrayListMultimap.create() );
+
+ ExecutorService execService = Executors.newFixedThreadPool( poolSize );
+
+ for (int i = 0; i < numUsers; i++) {
+
+ // multiple threads simultaneously trying to create a user with the same propertyName
+ for (int j = 0; j < numThreads; j++) {
+ String username = "user_" + i;
+
+ execService.submit( () -> {
+
+ try {
+
+ // give entity two unqiue fields username and email
+ Entity newEntity = new Entity( new SimpleId( "user" ) );
+ newEntity.setField( new StringField( "username", username, true ) );
+ newEntity.setField( new StringField( "email", username + "@example.org", true ) );
+
+ Observable<Entity> observable = manager.write( newEntity, null );
+ Entity returned = observable.toBlocking().lastOrDefault( null );
+
+ usersCreated.put( username, newEntity );
+ successCounter.incrementAndGet();
+
+ logger.debug("Created user {}", username);
+
+ } catch ( Throwable t ) {
+ if ( t instanceof WriteUniqueVerifyException) {
+ // we expect lots of these
+ } else {
+ errorCounter.incrementAndGet();
+ logger.error( "Error creating user " + username, t );
+ }
+ }
+
+ } );
+ }
+ }
+ execService.shutdown();
+
+ try {
+ while (!execService.awaitTermination( 60, TimeUnit.SECONDS )) {
+ System.out.println( "Waiting..." );
+ }
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+
+ return usersCreated;
+ }
+}
http://git-wip-us.apache.org/repos/asf/usergrid/blob/996bf09f/stack/corepersistence/collection/src/test/resources/usergrid.properties
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/test/resources/usergrid.properties b/stack/corepersistence/collection/src/test/resources/usergrid.properties
index ebc2ad4..8d615d0 100644
--- a/stack/corepersistence/collection/src/test/resources/usergrid.properties
+++ b/stack/corepersistence/collection/src/test/resources/usergrid.properties
@@ -20,6 +20,7 @@
# This property is required to be set and cannot be defaulted anywhere
usergrid.cluster_name=usergrid
+# --- Start: Usergrid cluster/actor system settings
usergrid.cluster.enabled=true
usergrid.cluster.hostname=localhost
@@ -29,3 +30,5 @@ usergrid.cluster.seeds=us-east\:localhost
collection.uniquevalues.actors=300
collection.uniquevalues.authoritative.region=us-east
+
+# --- End: Usergrid cluster/actor system settings
http://git-wip-us.apache.org/repos/asf/usergrid/blob/996bf09f/stack/rest/src/test/java/org/apache/usergrid/rest/UniqueCatsIT.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/UniqueCatsIT.java b/stack/rest/src/test/java/org/apache/usergrid/rest/UniqueCatsIT.java
index 0120660..c0209af 100644
--- a/stack/rest/src/test/java/org/apache/usergrid/rest/UniqueCatsIT.java
+++ b/stack/rest/src/test/java/org/apache/usergrid/rest/UniqueCatsIT.java
@@ -49,7 +49,7 @@ import static com.codahale.metrics.MetricRegistry.name;
/**
- * Tests that Catgrid will not allow creation of entities with duplicate names.
+ * Tests that Usergrid will not allow creation of entities with duplicate names.
*
* Intended for use against a production-like cluster, not run during normal JUnit testing.
*
http://git-wip-us.apache.org/repos/asf/usergrid/blob/996bf09f/stack/rest/src/test/java/org/apache/usergrid/rest/applications/ApplicationDeleteIT.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/applications/ApplicationDeleteIT.java b/stack/rest/src/test/java/org/apache/usergrid/rest/applications/ApplicationDeleteIT.java
index cc635ed..c1301bb 100644
--- a/stack/rest/src/test/java/org/apache/usergrid/rest/applications/ApplicationDeleteIT.java
+++ b/stack/rest/src/test/java/org/apache/usergrid/rest/applications/ApplicationDeleteIT.java
@@ -77,7 +77,7 @@ public class ApplicationDeleteIT extends AbstractRestIT {
ApiResponse appCreateAgainResponse = null;
int retries = 0;
- while ( retries++ < 100 ) {
+ while ( retries++ < 30 ) {
try {
appCreateAgainResponse = clientSetup.getRestClient()
.management().orgs().org( orgName ).app().getTarget()