usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snoopd...@apache.org
Subject [09/50] [abbrv] usergrid git commit: USERGRID-1044: handle audit for CSV rows that don't have UUIDs by accessing via name
Date Fri, 06 Nov 2015 20:38:03 GMT
USERGRID-1044: handle audit for CSV rows that don't have UUIDs by accessing via name


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

Branch: refs/heads/asf-site
Commit: 9158772bc20befa8affa6c1bc10af032a07d0400
Parents: 4b2d003
Author: Mike Dunker <mdunker@apigee.com>
Authored: Tue Oct 27 12:46:48 2015 -0700
Committer: Mike Dunker <mdunker@apigee.com>
Committed: Tue Oct 27 12:46:48 2015 -0700

----------------------------------------------------------------------
 .../org/apache/usergrid/datagenerators/FeederGenerator.scala    | 5 ++++-
 .../scala/org/apache/usergrid/scenarios/AuditScenarios.scala    | 4 ++--
 2 files changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/usergrid/blob/9158772b/stack/loadtests/src/main/scala/org/apache/usergrid/datagenerators/FeederGenerator.scala
----------------------------------------------------------------------
diff --git a/stack/loadtests/src/main/scala/org/apache/usergrid/datagenerators/FeederGenerator.scala
b/stack/loadtests/src/main/scala/org/apache/usergrid/datagenerators/FeederGenerator.scala
index b8a28d5..73b3d3c 100755
--- a/stack/loadtests/src/main/scala/org/apache/usergrid/datagenerators/FeederGenerator.scala
+++ b/stack/loadtests/src/main/scala/org/apache/usergrid/datagenerators/FeederGenerator.scala
@@ -280,8 +280,11 @@ object FeederGenerator {
       val uuid = if (line != null) array(2) else ""
       val modified = if (line != null) array(3) else ""
       //println(s"$collectionName|$name|$uuid|$modified")
+      val accessField = if (uuid != "") uuid else name
+      val queryField = if (uuid != "") s"uuid='$uuid'" else s"name='$name'"
 
-      Map("collectionName" -> collectionName, "name" -> name,  "uuid" -> uuid, "modified"
-> modified, "validEntity" -> validEntity)
+      Map("collectionName" -> collectionName, "name" -> name,  "uuid" -> uuid, "modified"
-> modified,
+        "validEntity" -> validEntity, "accessField" -> accessField, "queryField" ->
queryField)
     }
   }
 

http://git-wip-us.apache.org/repos/asf/usergrid/blob/9158772b/stack/loadtests/src/main/scala/org/apache/usergrid/scenarios/AuditScenarios.scala
----------------------------------------------------------------------
diff --git a/stack/loadtests/src/main/scala/org/apache/usergrid/scenarios/AuditScenarios.scala
b/stack/loadtests/src/main/scala/org/apache/usergrid/scenarios/AuditScenarios.scala
index f90348e..7a93eb6 100644
--- a/stack/loadtests/src/main/scala/org/apache/usergrid/scenarios/AuditScenarios.scala
+++ b/stack/loadtests/src/main/scala/org/apache/usergrid/scenarios/AuditScenarios.scala
@@ -144,7 +144,7 @@ object AuditScenarios {
 
   val getCollectionEntityDirect = exec(
     http("GET collection entity direct")
-      .get("/${collectionName}/${uuid}")
+      .get("/${collectionName}/${accessField}")
       .headers(Headers.authToken)
       .headers(Headers.usergridRegionHeaders)
       .check()
@@ -213,7 +213,7 @@ object AuditScenarios {
 
   val getCollectionEntity = exec(
     http("GET collection entity")
-      .get("/${collectionName}?ql=uuid=${uuid}")
+      .get("/${collectionName}?ql=${queryField}")
       .headers(Headers.authToken)
       .headers(Headers.usergridRegionHeaders)
       .check(status.is(200), status.saveAs(SessionVarStatus), jsonPath("$.count").optional.saveAs("count"),


Mime
View raw message