You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by to...@apache.org on 2015/06/12 23:01:59 UTC

[1/2] incubator-usergrid git commit: adding test documentation

Repository: incubator-usergrid
Updated Branches:
  refs/heads/USERGRID-744 f99c6762e -> 8f9933862


adding test documentation


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

Branch: refs/heads/USERGRID-744
Commit: 10ce687f3c0138c48613ef1df4e858c917655b83
Parents: a4b51fb
Author: Shawn Feldman <sf...@apache.org>
Authored: Fri Jun 12 15:00:02 2015 -0600
Committer: Shawn Feldman <sf...@apache.org>
Committed: Fri Jun 12 15:00:02 2015 -0600

----------------------------------------------------------------------
 .../corepersistence/index/IndexNamingTest.java        | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/10ce687f/stack/core/src/test/java/org/apache/usergrid/corepersistence/index/IndexNamingTest.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/corepersistence/index/IndexNamingTest.java b/stack/core/src/test/java/org/apache/usergrid/corepersistence/index/IndexNamingTest.java
index 55e209e..ee51154 100644
--- a/stack/core/src/test/java/org/apache/usergrid/corepersistence/index/IndexNamingTest.java
+++ b/stack/core/src/test/java/org/apache/usergrid/corepersistence/index/IndexNamingTest.java
@@ -103,13 +103,14 @@ public class IndexNamingTest {
     public void managementAliasName(){
         IndexLocationStrategy indexLocationStrategy = indexLocationStrategyFactory.getIndexLocationStrategy(managementApplicationScope);
 
+        String managementAppIndexName = indexProcessorFig.getManagementAppIndexName();
         assertEquals(
             indexLocationStrategy.getAlias().getReadAlias(),
-            clusterName + "_" + keyspacename+ "_" + indexProcessorFig.getManagementAppIndexName() + "_read_" + indexFig.getAliasPostfix()
+            clusterName + "_" + keyspacename+ "_" + managementAppIndexName + "_read_" + indexFig.getAliasPostfix()
         );
         assertEquals(
             indexLocationStrategy.getAlias().getWriteAlias(),
-            clusterName + "_" + keyspacename + "_" + indexProcessorFig.getManagementAppIndexName()  + "_write_" + indexFig.getAliasPostfix()
+            clusterName + "_" + keyspacename + "_" + managementAppIndexName + "_write_" + indexFig.getAliasPostfix()
         );
     }
 
@@ -132,13 +133,14 @@ public class IndexNamingTest {
     @Test
     public void applicationAliasName(){
         IndexLocationStrategy indexLocationStrategy = indexLocationStrategyFactory.getIndexLocationStrategy(applicationScope);
+        String applicationId = applicationScope.getApplication().getUuid().toString().toLowerCase();
         assertEquals(
             indexLocationStrategy.getAlias().getReadAlias(),
-            clusterName + "_" + keyspacename+"_"+ applicationScope.getApplication().getUuid().toString().toLowerCase() + "_read_" + indexFig.getAliasPostfix()
+            clusterName + "_" + keyspacename+"_"+ applicationId + "_read_" + indexFig.getAliasPostfix()
         );
         assertEquals(
             indexLocationStrategy.getAlias().getWriteAlias(),
-            clusterName + "_" + keyspacename+"_"+ applicationScope.getApplication().getUuid().toString().toLowerCase() + "_write_" + indexFig.getAliasPostfix()
+            clusterName + "_" + keyspacename+"_"+ applicationId + "_write_" + indexFig.getAliasPostfix()
         );
     }
 
@@ -153,11 +155,11 @@ public class IndexNamingTest {
                 );
             names.add(indexLocationStrategyBucket.getIndexInitialName());
         }
-        String expectedName = clusterName+"_"+keyspacename+"_\\d+";
-        Pattern regex = Pattern.compile(expectedName);
+        Pattern regex = Pattern.compile(clusterName+"_"+keyspacename+"_\\d+");
         //always hashes to same bucket
         assertTrue(names.size() == 1);
         names = new HashSet<>();
+        //get 100 names you should get 5 unique values in the set since app id is the same
         for(int i=0;i<100;i++){
             IndexLocationStrategy indexLocationStrategyBucket =
                 new ApplicationIndexLocationStrategy(


[2/2] incubator-usergrid git commit: Merge branch 'two-dot-o-dev' of https://git-wip-us.apache.org/repos/asf/incubator-usergrid into USERGRID-744

Posted by to...@apache.org.
Merge branch 'two-dot-o-dev' of https://git-wip-us.apache.org/repos/asf/incubator-usergrid into USERGRID-744


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

Branch: refs/heads/USERGRID-744
Commit: 8f9933862de35391bafa2d43a94047a29f6ec751
Parents: f99c676 10ce687
Author: Todd Nine <tn...@apigee.com>
Authored: Fri Jun 12 15:01:43 2015 -0600
Committer: Todd Nine <tn...@apigee.com>
Committed: Fri Jun 12 15:01:43 2015 -0600

----------------------------------------------------------------------
 .../corepersistence/index/IndexNamingTest.java        | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)
----------------------------------------------------------------------