usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdun...@apache.org
Subject [09/15] usergrid git commit: test changes and additional logging
Date Mon, 28 Aug 2017 23:23:55 GMT
test changes and additional logging


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

Branch: refs/heads/master
Commit: 39ec4f2bb895e180f493349fb14e62ac9178e5ee
Parents: 400365c
Author: Mike Dunker <mdunker@google.com>
Authored: Fri Aug 18 09:46:50 2017 -0700
Committer: Mike Dunker <mdunker@google.com>
Committed: Fri Aug 18 09:46:50 2017 -0700

----------------------------------------------------------------------
 .../corepersistence/CpEntityManagerFactory.java         |  2 +-
 .../asyncevents/AsyncEventServiceImpl.java              |  2 ++
 .../apache/usergrid/persistence/RebuildIndexTest.java   | 12 ++++++------
 .../queues/impl/QueueSerializationImpl.java             |  2 +-
 .../apache/usergrid/services/ActivitiesServiceIT.java   |  9 ++++++---
 .../apache/usergrid/services/ServiceInvocationIT.java   |  3 +++
 6 files changed, 19 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/usergrid/blob/39ec4f2b/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManagerFactory.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManagerFactory.java
b/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManagerFactory.java
index cec7258..bad5b2c 100644
--- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManagerFactory.java
+++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManagerFactory.java
@@ -487,7 +487,7 @@ public class CpEntityManagerFactory implements EntityManagerFactory, Application
         // evict app Id from cache
         applicationIdCache.evictAppId(appName);
 
-        logger.info("Initialized application {}", appName);
+        logger.info("Initialized application {}, uuid {}", appName, appInfo.getUuid().toString());
         return appInfo;
     }
 

http://git-wip-us.apache.org/repos/asf/usergrid/blob/39ec4f2b/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AsyncEventServiceImpl.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AsyncEventServiceImpl.java
b/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AsyncEventServiceImpl.java
index 530cf7d..9501ad3 100644
--- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AsyncEventServiceImpl.java
+++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AsyncEventServiceImpl.java
@@ -881,6 +881,8 @@ public class AsyncEventServiceImpl implements AsyncEventService {
         final int utilityCount = indexProcessorFig.getWorkerCountUtility();
         final int indexDeadCount = indexProcessorFig.getWorkerCountDeadLetter();
         final int utilityDeadCount = indexProcessorFig.getWorkerCountUtilityDeadLetter();
+        logger.info("Starting queue workers for indexing: index={} indexDLQ={} utility={}
utilityDLQ={}", indexCount, indexDeadCount,
+            utilityCount, utilityDeadCount);
 
         for (int i = 0; i < indexCount; i++) {
             startWorker(QUEUE_NAME);

http://git-wip-us.apache.org/repos/asf/usergrid/blob/39ec4f2b/stack/core/src/test/java/org/apache/usergrid/persistence/RebuildIndexTest.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/persistence/RebuildIndexTest.java
b/stack/core/src/test/java/org/apache/usergrid/persistence/RebuildIndexTest.java
index a7759de..d2bff37 100644
--- a/stack/core/src/test/java/org/apache/usergrid/persistence/RebuildIndexTest.java
+++ b/stack/core/src/test/java/org/apache/usergrid/persistence/RebuildIndexTest.java
@@ -77,7 +77,7 @@ public class RebuildIndexTest extends AbstractCoreIT {
     @Test( timeout = 120000 )
     public void rebuildOneCollectionIndex() throws Exception {
 
-        logger.info( "Started rebuildIndex()" );
+        logger.info( "Started rebuildOneCollectionIndex()" );
 
         String rand = RandomStringUtils.randomAlphanumeric( 5 );
         final UUID appId = setup.createApplication( "org_" + rand, "app_" + rand );
@@ -172,7 +172,7 @@ public class RebuildIndexTest extends AbstractCoreIT {
     }
 
 
-    @Test( timeout = 120000 )
+    @Test( timeout = 240000 )
     public void rebuildIndex() throws Exception {
 
         logger.info( "Started rebuildIndex()" );
@@ -234,7 +234,7 @@ public class RebuildIndexTest extends AbstractCoreIT {
         }
 
         logger.info( "Created {} entities", ENTITIES_TO_INDEX );
-        app.waitForQueueDrainAndRefreshIndex(15000);
+        app.waitForQueueDrainAndRefreshIndex(30000);
 
         // ----------------- test that we can read them, should work fine
 
@@ -301,7 +301,7 @@ public class RebuildIndexTest extends AbstractCoreIT {
     @Test( timeout = 120000 )
     public void rebuildIndexGeo() throws Exception {
 
-        logger.info( "Started rebuildIndex()" );
+        logger.info( "Started rebuildIndexGeo()" );
 
         String rand = RandomStringUtils.randomAlphanumeric( 5 );
         final UUID appId = setup.createApplication( "org_" + rand, "app_" + rand );
@@ -414,7 +414,7 @@ public class RebuildIndexTest extends AbstractCoreIT {
     @Test( timeout = 120000 )
     public void rebuildUpdatedSince() throws Exception {
 
-        logger.info( "Started rebuildIndex()" );
+        logger.info( "Started rebuildUpdatedSince()" );
 
         String rand = RandomStringUtils.randomAlphanumeric( 5 );
         final UUID appId = setup.createApplication( "org_" + rand, "app_" + rand );
@@ -436,7 +436,7 @@ public class RebuildIndexTest extends AbstractCoreIT {
 
         final Entity secondEntity = em.create( "thing",  entityData);
 
-        app.waitForQueueDrainAndRefreshIndex(5000);
+        app.waitForQueueDrainAndRefreshIndex(15000);
 
         // ----------------- test that we can read them, should work fine
 

http://git-wip-us.apache.org/repos/asf/usergrid/blob/39ec4f2b/stack/corepersistence/queue/src/main/java/org/apache/usergrid/persistence/qakka/serialization/queues/impl/QueueSerializationImpl.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/queue/src/main/java/org/apache/usergrid/persistence/qakka/serialization/queues/impl/QueueSerializationImpl.java
b/stack/corepersistence/queue/src/main/java/org/apache/usergrid/persistence/qakka/serialization/queues/impl/QueueSerializationImpl.java
index d3a46aa..2ed37e0 100644
--- a/stack/corepersistence/queue/src/main/java/org/apache/usergrid/persistence/qakka/serialization/queues/impl/QueueSerializationImpl.java
+++ b/stack/corepersistence/queue/src/main/java/org/apache/usergrid/persistence/qakka/serialization/queues/impl/QueueSerializationImpl.java
@@ -163,7 +163,7 @@ public class QueueSerializationImpl implements QueueSerialization {
     @Override
     public Collection<TableDefinition> getTables() {
         return Collections.singletonList(
-            new TableDefinitionStringImpl( cassandraConfig.getApplicationKeyspace(), "queues",
CQL ) );
+            new TableDefinitionStringImpl( cassandraConfig.getApplicationKeyspace(), TABLE_QUEUES,
CQL ) );
     }
 
 }

http://git-wip-us.apache.org/repos/asf/usergrid/blob/39ec4f2b/stack/services/src/test/java/org/apache/usergrid/services/ActivitiesServiceIT.java
----------------------------------------------------------------------
diff --git a/stack/services/src/test/java/org/apache/usergrid/services/ActivitiesServiceIT.java
b/stack/services/src/test/java/org/apache/usergrid/services/ActivitiesServiceIT.java
index c4762f2..c8a446a 100644
--- a/stack/services/src/test/java/org/apache/usergrid/services/ActivitiesServiceIT.java
+++ b/stack/services/src/test/java/org/apache/usergrid/services/ActivitiesServiceIT.java
@@ -93,11 +93,14 @@ public class ActivitiesServiceIT extends AbstractServiceIT {
 
         app.testRequest( ServiceAction.GET, 4, null, "users", userC.getUuid(), "feed" );
 
-        app.testRequest( ServiceAction.GET, 2, null, "users", userC.getUuid(), "feed",
-                Query.fromQL( "select * where content contains 'cookie'" ) );
+        // time for indexing
+        Thread.sleep(10000);
 
         app.testRequest( ServiceAction.GET, 1, "users", userC.getUuid(), "feed",
-                Query.fromQL( "select * where verb='post' and content contains 'cookie'"
) );
+            Query.fromQL( "select * where verb='post' and content contains 'cookie'" ) );
+
+        app.testRequest( ServiceAction.GET, 2, null, "users", userC.getUuid(), "feed",
+                Query.fromQL( "select * where content contains 'cookie'" ) );
 
         app.put( "username", "finn" );
         app.put( "email", "finn@ooo.com" );

http://git-wip-us.apache.org/repos/asf/usergrid/blob/39ec4f2b/stack/services/src/test/java/org/apache/usergrid/services/ServiceInvocationIT.java
----------------------------------------------------------------------
diff --git a/stack/services/src/test/java/org/apache/usergrid/services/ServiceInvocationIT.java
b/stack/services/src/test/java/org/apache/usergrid/services/ServiceInvocationIT.java
index 81dced1..434fd80 100644
--- a/stack/services/src/test/java/org/apache/usergrid/services/ServiceInvocationIT.java
+++ b/stack/services/src/test/java/org/apache/usergrid/services/ServiceInvocationIT.java
@@ -102,6 +102,9 @@ public class ServiceInvocationIT extends AbstractServiceIT {
 
         app.testRequest( ServiceAction.GET, 2, "users", "edanuff", "likes", "restaurants"
);
 
+        // time for indexing
+        Thread.sleep(10000);
+
         app.testRequest( ServiceAction.GET, 1, "users", "edanuff", "likes", "restaurants",
                 Query.fromQL( "select * where name='Brickhouse'" ) );
 


Mime
View raw message