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/02/16 20:06:28 UTC

[37/50] incubator-usergrid git commit: updated load tests

updated load tests


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

Branch: refs/heads/USERGRID-273
Commit: 97fe63b3909ab7eca4ed6991c4edae2fd158fb7a
Parents: 6e301f0
Author: Rod Simpson <ro...@apigee.com>
Authored: Fri Feb 13 14:13:57 2015 -0700
Committer: Rod Simpson <ro...@apigee.com>
Committed: Fri Feb 13 14:13:57 2015 -0700

----------------------------------------------------------------------
 .../org/apache/usergrid/scenarios/EntityScenarios.scala   | 10 +++++-----
 .../usergrid/simulations/PostCustomEntitySimulation.scala |  5 ++---
 2 files changed, 7 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/97fe63b3/stack/loadtests/src/main/scala/org/apache/usergrid/scenarios/EntityScenarios.scala
----------------------------------------------------------------------
diff --git a/stack/loadtests/src/main/scala/org/apache/usergrid/scenarios/EntityScenarios.scala b/stack/loadtests/src/main/scala/org/apache/usergrid/scenarios/EntityScenarios.scala
index 35b80d7..bea68b8 100644
--- a/stack/loadtests/src/main/scala/org/apache/usergrid/scenarios/EntityScenarios.scala
+++ b/stack/loadtests/src/main/scala/org/apache/usergrid/scenarios/EntityScenarios.scala
@@ -31,14 +31,14 @@ object EntityScenarios {
 
   val getEntity = exec(
     http("GET custom entityr")
-      .get(Settings.baseUrl+"/${collectionType}/${entityName}")
+      .get(Settings.baseAppUrl+"/${collectionType}/${entityName}")
       .headers(Headers.jsonAuthorized)
       .check(status.is(200))
   )
 
   val putEntity = exec(
     http("Put custom entity")
-      .put(Settings.baseUrl+"/${collectionType}/${entityName}")
+      .put(Settings.baseAppUrl+"/${collectionType}/${entityName}")
       .body(StringBody("{\"address\":\""+Utils.generateRandomInt(1, Settings.numEntities)+"\",\"phone\":\""+Utils.generateRandomInt(1, Settings.numEntities)+"\"}}"))
       .headers(Headers.jsonAuthorized)
       .check(status.is(200))
@@ -47,7 +47,7 @@ object EntityScenarios {
 
   val deleteEntity = exec(
     http("DELETE custom entityr")
-      .get(Settings.baseUrl+"/${collectionType}/${entityName}")
+      .get(Settings.baseAppUrl+"/${collectionType}/${entityName}")
       .headers(Headers.jsonAuthorized)
       .check(status.is(200))
   )
@@ -55,10 +55,10 @@ object EntityScenarios {
   val postEntity = exec(
     http("Post custom entity")
       //.post(Settings.baseUrl+"/${collectionType}")
-      .post(Settings.baseUrl+"/restaurants")
+      .post(Settings.baseAppUrl+"/restaurants")
       //.body(StringBody(EntityDataGenerator.generateCustomEntity("/${entityName}").toString()))
       .body(StringBody("{\"property\":\"fred\"}"))
-      .headers(Headers.jsonAuthorized)
+      .headers(Headers.jsonAnonymous)
       .check(status.is(200))
   )
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/97fe63b3/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/PostCustomEntitySimulation.scala
----------------------------------------------------------------------
diff --git a/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/PostCustomEntitySimulation.scala b/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/PostCustomEntitySimulation.scala
index f5523b1..cd5446c 100644
--- a/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/PostCustomEntitySimulation.scala
+++ b/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/PostCustomEntitySimulation.scala
@@ -37,8 +37,8 @@ class PostCustomEntitySimulation extends Simulation {
 
   if(!Settings.skipSetup) {
     println("Begin setup")
-    Setup.setupOrg()
-    Setup.setupApplication()
+    //Setup.setupOrg()
+    //Setup.setupApplication()
     println("End Setup")
   }else{
     println("Skipping Setup")
@@ -53,7 +53,6 @@ class PostCustomEntitySimulation extends Simulation {
 
   val scnToRun = scenario("POST custom entities")
     .feed(feeder)
-    .exec(TokenScenarios.getManagementToken)
     .exec(EntityScenarios.postEntity)
 
   setUp(scnToRun.inject(atOnceUsers(numEntities)).throttle(reachRps(throttle) in (rampTime.seconds)).protocols(httpConf)).maxDuration(Settings.duration)