You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by sn...@apache.org on 2015/08/28 19:26:17 UTC

[1/2] usergrid git commit: Fix tests around the new index mapping to include 'size'.

Repository: usergrid
Updated Branches:
  refs/heads/two-dot-o-dev 88b64e435 -> 11f5bfeff


Fix tests around the new index mapping to include 'size'.


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

Branch: refs/heads/two-dot-o-dev
Commit: b9d85b3269e49a76c8e6cc7865b1d7f6cb9b48fb
Parents: 1cc7a6a
Author: Michael Russo <mi...@gmail.com>
Authored: Fri Aug 28 10:22:01 2015 -0700
Committer: Michael Russo <mi...@gmail.com>
Committed: Fri Aug 28 10:24:04 2015 -0700

----------------------------------------------------------------------
 .../index/impl/EsIndexMappingMigrationPluginTest.java     | 10 ++++++----
 .../applications/collection/users/UserResourceIT.java     |  3 +--
 2 files changed, 7 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/usergrid/blob/b9d85b32/stack/corepersistence/queryindex/src/test/java/org/apache/usergrid/persistence/index/impl/EsIndexMappingMigrationPluginTest.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/queryindex/src/test/java/org/apache/usergrid/persistence/index/impl/EsIndexMappingMigrationPluginTest.java b/stack/corepersistence/queryindex/src/test/java/org/apache/usergrid/persistence/index/impl/EsIndexMappingMigrationPluginTest.java
index 6d61cb1..d4ce9e6 100644
--- a/stack/corepersistence/queryindex/src/test/java/org/apache/usergrid/persistence/index/impl/EsIndexMappingMigrationPluginTest.java
+++ b/stack/corepersistence/queryindex/src/test/java/org/apache/usergrid/persistence/index/impl/EsIndexMappingMigrationPluginTest.java
@@ -31,7 +31,6 @@ import org.junit.runner.RunWith;
 import org.mockito.Mockito;
 
 import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
 
 /**
  * Classy class class.
@@ -47,15 +46,18 @@ public class EsIndexMappingMigrationPluginTest extends BaseIT {
     @Inject
     EsProvider provider;
     @Test
-    public void runMigration(){
+    public void runMigration() {
         MigrationInfoSerialization serialization = Mockito.mock(MigrationInfoSerialization.class);
         Mockito.when(serialization.getVersion(Mockito.any())).thenReturn(0);
         EsIndexMappingMigrationPlugin plugin = new EsIndexMappingMigrationPlugin(serialization,provider);
         TestProgressObserver progressObserver = new TestProgressObserver();
         plugin.run(progressObserver);
-        assertFalse( "Progress observer should not have failed", progressObserver.isFailed() );
-        assertTrue("Progress observer should have update messages", progressObserver.getUpdates().size() > 0);
 
+        // check for failures
+        assertFalse("Progress observer should not have failed", progressObserver.isFailed());
+
+        // after completed, updates could have size 0 or more (0 if no indices present). testing observer's 'updates'
+        // size doesn't help.  TODO update test to ensure an index is present before running
 
     }
 

http://git-wip-us.apache.org/repos/asf/usergrid/blob/b9d85b32/stack/rest/src/test/java/org/apache/usergrid/rest/applications/collection/users/UserResourceIT.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/applications/collection/users/UserResourceIT.java b/stack/rest/src/test/java/org/apache/usergrid/rest/applications/collection/users/UserResourceIT.java
index a387436..b249fea 100644
--- a/stack/rest/src/test/java/org/apache/usergrid/rest/applications/collection/users/UserResourceIT.java
+++ b/stack/rest/src/test/java/org/apache/usergrid/rest/applications/collection/users/UserResourceIT.java
@@ -1070,8 +1070,7 @@ public class UserResourceIT extends AbstractRestIT {
 
             assertNotNull("List must exist", response.getResponse().getEntities());
             assertTrue("Must be some list items", response.getResponse().getEntities().size() > 0);
-
-            assertTrue("Must be some list items", response.getResponse().getEntities().get(0).keySet().size() == 3);
+            assertTrue("Should have 4 items - [metadata, size, type, uuid]", response.getResponse().getEntities().get(0).keySet().size() == 4);
 
         }
     }


[2/2] usergrid git commit: Merge branch 'pr/362' into two-dot-o-dev. This closes #262.

Posted by sn...@apache.org.
Merge branch 'pr/362' into two-dot-o-dev. This closes #262.


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

Branch: refs/heads/two-dot-o-dev
Commit: 11f5bfeffc231123b7791ecc5e92aa2e1e28d636
Parents: 88b64e4 b9d85b3
Author: Dave Johnson <sn...@apache.org>
Authored: Fri Aug 28 13:25:38 2015 -0400
Committer: Dave Johnson <sn...@apache.org>
Committed: Fri Aug 28 13:25:38 2015 -0400

----------------------------------------------------------------------
 .../index/impl/EsIndexMappingMigrationPluginTest.java     | 10 ++++++----
 .../applications/collection/users/UserResourceIT.java     |  3 +--
 2 files changed, 7 insertions(+), 6 deletions(-)
----------------------------------------------------------------------