usergrid git commit: USERGRID-1044: add audit delete test (delete only, no verify)

2015-11-02 Thread mdunker
Repository: usergrid
Updated Branches:
  refs/heads/USERGRID-1044 0fc18041e -> 247f79603


USERGRID-1044: add audit delete test (delete only, no verify)


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

Branch: refs/heads/USERGRID-1044
Commit: 247f79603d1775273a56274ce7810f1b8f1f5d29
Parents: 0fc1804
Author: Mike Dunker 
Authored: Mon Nov 2 07:34:42 2015 -0800
Committer: Mike Dunker 
Committed: Mon Nov 2 07:34:42 2015 -0800

--
 stack/loadtests/runAuditDeleteEntities.sh   | 65 
 .../runAuditVerifyCollectionEntities.sh |  2 +-
 .../apache/usergrid/enums/ScenarioType.scala|  3 +-
 .../usergrid/scenarios/AuditScenarios.scala | 49 ++-
 .../usergrid/simulations/AuditSimulation.scala  |  4 +-
 5 files changed, 118 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/usergrid/blob/247f7960/stack/loadtests/runAuditDeleteEntities.sh
--
diff --git a/stack/loadtests/runAuditDeleteEntities.sh 
b/stack/loadtests/runAuditDeleteEntities.sh
new file mode 100755
index 000..ff92940
--- /dev/null
+++ b/stack/loadtests/runAuditDeleteEntities.sh
@@ -0,0 +1,65 @@
+#!/bin/bash
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+DIR="${BASH_SOURCE%/*}"
+if [[ ! -d "$DIR" ]]; then DIR="$PWD"; fi
+. "$DIR/testConfig.sh"
+
+# from testConfig.sh
+#URL=
+#ADMIN_USER=
+#ADMIN_PASSWORD=
+#ORG=
+#APP=
+#AUTH_TYPE=
+#TOKEN_TYPE=
+#RETRY_COUNT=
+
+die() { echo "$@" 1>&2 ; exit 1; }
+
+[ "$#" -ge 3 ] || die "At least 3 arguments required, $# provided.  Example is 
$0 RAMP_USERS RAMP_TIME(seconds) AUDIT_UUID_FILENAME [FAILED_UUID_FILENAME 
[USERGRID_REGION]]"
+
+RAMP_USERS="$1"
+RAMP_TIME="$2"
+AUDIT_UUID_FILENAME="$3"
+FAILED_UUID_FILENAME="$4"
+[ "$#" -ge 5 ] && USERGRID_REGION="$5"
+
+shift $#
+
+SCENARIO_TYPE=auditDeleteEntities
+
+#Compile everything
+mvn compile
+
+#Execute the test
+mvn gatling:execute \
+-DbaseUrl=${URL} \
+-DadminUser=${ADMIN_USER}  \
+-DadminPassword=${ADMIN_PASSWORD}  \
+-Dorg=${ORG} \
+-Dapp=${APP} \
+-DauthType=${AUTH_TYPE} \
+-DtokenType=${TOKEN_TYPE} \
+-DretryCount=${RETRY_COUNT} \
+-DscenarioType=${SCENARIO_TYPE} \
+-DrampUsers=${RAMP_USERS}  \
+-DrampTime=${RAMP_TIME}  \
+-DauditUuidFilename=${AUDIT_UUID_FILENAME} \
+-DfailedUuidFilename=${FAILED_UUID_FILENAME} \
+-DprintFailedRequests=${PRINT_FAILED_REQUESTS} \
+-DusergridRegion=${USERGRID_REGION} \
+-Dgatling.simulationClass=org.apache.usergrid.simulations.AuditSimulation
+

http://git-wip-us.apache.org/repos/asf/usergrid/blob/247f7960/stack/loadtests/runAuditVerifyCollectionEntities.sh
--
diff --git a/stack/loadtests/runAuditVerifyCollectionEntities.sh 
b/stack/loadtests/runAuditVerifyCollectionEntities.sh
index 695c9ee..be50189 100755
--- a/stack/loadtests/runAuditVerifyCollectionEntities.sh
+++ b/stack/loadtests/runAuditVerifyCollectionEntities.sh
@@ -31,7 +31,7 @@ DELETE_AFTER_SUCCESSFUL_AUDIT=false
 
 die() { echo "$@" 1>&2 ; exit 1; }
 
-[ "$#" -ge 3 ] || die "At least 3 arguments required, $# provided.  Example is 
$0 RAMP_USERS RAMP_TIME(seconds) AUDIT_UUID_FILENAME [FAILED_UUID_FILENAME 
[DELETE_AFTER_SUCCESSFUL_AUDIT(true/false)[USERGRID_REGION]]]"
+[ "$#" -ge 3 ] || die "At least 3 arguments required, $# provided.  Example is 
$0 RAMP_USERS RAMP_TIME(seconds) AUDIT_UUID_FILENAME [FAILED_UUID_FILENAME 
[DELETE_AFTER_SUCCESSFUL_AUDIT(true/false) [USERGRID_REGION]]]"
 
 RAMP_USERS="$1"
 RAMP_TIME="$2"

http://git-wip-us.apache.org/repos/asf/usergrid/blob/247f7960/stack/loadtests/src/main/scala/org/apache/usergrid/enums/ScenarioType.scala
--
diff --git 
a/stack/loadtests/src/main/scala/org/apache/usergrid/enums/ScenarioType.scala 
b/stack/loadtests/src/main/scala/org/apache/usergrid/enums/ScenarioType.scala
index c86dc33..1cc1fa2 100644
--- 
a/stack/loadtests/src/main/scala/org/apache/usergrid/enums/ScenarioType.scala
+++ 

[15/17] usergrid git commit: USERGRID-1044: add audit delete test (delete only, no verify)

2015-11-02 Thread mrusso
USERGRID-1044: add audit delete test (delete only, no verify)


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

Branch: refs/heads/master
Commit: 247f79603d1775273a56274ce7810f1b8f1f5d29
Parents: 0fc1804
Author: Mike Dunker 
Authored: Mon Nov 2 07:34:42 2015 -0800
Committer: Mike Dunker 
Committed: Mon Nov 2 07:34:42 2015 -0800

--
 stack/loadtests/runAuditDeleteEntities.sh   | 65 
 .../runAuditVerifyCollectionEntities.sh |  2 +-
 .../apache/usergrid/enums/ScenarioType.scala|  3 +-
 .../usergrid/scenarios/AuditScenarios.scala | 49 ++-
 .../usergrid/simulations/AuditSimulation.scala  |  4 +-
 5 files changed, 118 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/usergrid/blob/247f7960/stack/loadtests/runAuditDeleteEntities.sh
--
diff --git a/stack/loadtests/runAuditDeleteEntities.sh 
b/stack/loadtests/runAuditDeleteEntities.sh
new file mode 100755
index 000..ff92940
--- /dev/null
+++ b/stack/loadtests/runAuditDeleteEntities.sh
@@ -0,0 +1,65 @@
+#!/bin/bash
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+DIR="${BASH_SOURCE%/*}"
+if [[ ! -d "$DIR" ]]; then DIR="$PWD"; fi
+. "$DIR/testConfig.sh"
+
+# from testConfig.sh
+#URL=
+#ADMIN_USER=
+#ADMIN_PASSWORD=
+#ORG=
+#APP=
+#AUTH_TYPE=
+#TOKEN_TYPE=
+#RETRY_COUNT=
+
+die() { echo "$@" 1>&2 ; exit 1; }
+
+[ "$#" -ge 3 ] || die "At least 3 arguments required, $# provided.  Example is 
$0 RAMP_USERS RAMP_TIME(seconds) AUDIT_UUID_FILENAME [FAILED_UUID_FILENAME 
[USERGRID_REGION]]"
+
+RAMP_USERS="$1"
+RAMP_TIME="$2"
+AUDIT_UUID_FILENAME="$3"
+FAILED_UUID_FILENAME="$4"
+[ "$#" -ge 5 ] && USERGRID_REGION="$5"
+
+shift $#
+
+SCENARIO_TYPE=auditDeleteEntities
+
+#Compile everything
+mvn compile
+
+#Execute the test
+mvn gatling:execute \
+-DbaseUrl=${URL} \
+-DadminUser=${ADMIN_USER}  \
+-DadminPassword=${ADMIN_PASSWORD}  \
+-Dorg=${ORG} \
+-Dapp=${APP} \
+-DauthType=${AUTH_TYPE} \
+-DtokenType=${TOKEN_TYPE} \
+-DretryCount=${RETRY_COUNT} \
+-DscenarioType=${SCENARIO_TYPE} \
+-DrampUsers=${RAMP_USERS}  \
+-DrampTime=${RAMP_TIME}  \
+-DauditUuidFilename=${AUDIT_UUID_FILENAME} \
+-DfailedUuidFilename=${FAILED_UUID_FILENAME} \
+-DprintFailedRequests=${PRINT_FAILED_REQUESTS} \
+-DusergridRegion=${USERGRID_REGION} \
+-Dgatling.simulationClass=org.apache.usergrid.simulations.AuditSimulation
+

http://git-wip-us.apache.org/repos/asf/usergrid/blob/247f7960/stack/loadtests/runAuditVerifyCollectionEntities.sh
--
diff --git a/stack/loadtests/runAuditVerifyCollectionEntities.sh 
b/stack/loadtests/runAuditVerifyCollectionEntities.sh
index 695c9ee..be50189 100755
--- a/stack/loadtests/runAuditVerifyCollectionEntities.sh
+++ b/stack/loadtests/runAuditVerifyCollectionEntities.sh
@@ -31,7 +31,7 @@ DELETE_AFTER_SUCCESSFUL_AUDIT=false
 
 die() { echo "$@" 1>&2 ; exit 1; }
 
-[ "$#" -ge 3 ] || die "At least 3 arguments required, $# provided.  Example is 
$0 RAMP_USERS RAMP_TIME(seconds) AUDIT_UUID_FILENAME [FAILED_UUID_FILENAME 
[DELETE_AFTER_SUCCESSFUL_AUDIT(true/false)[USERGRID_REGION]]]"
+[ "$#" -ge 3 ] || die "At least 3 arguments required, $# provided.  Example is 
$0 RAMP_USERS RAMP_TIME(seconds) AUDIT_UUID_FILENAME [FAILED_UUID_FILENAME 
[DELETE_AFTER_SUCCESSFUL_AUDIT(true/false) [USERGRID_REGION]]]"
 
 RAMP_USERS="$1"
 RAMP_TIME="$2"

http://git-wip-us.apache.org/repos/asf/usergrid/blob/247f7960/stack/loadtests/src/main/scala/org/apache/usergrid/enums/ScenarioType.scala
--
diff --git 
a/stack/loadtests/src/main/scala/org/apache/usergrid/enums/ScenarioType.scala 
b/stack/loadtests/src/main/scala/org/apache/usergrid/enums/ScenarioType.scala
index c86dc33..1cc1fa2 100644
--- 
a/stack/loadtests/src/main/scala/org/apache/usergrid/enums/ScenarioType.scala
+++ 
b/stack/loadtests/src/main/scala/org/apache/usergrid/enums/ScenarioType.scala
@@ -26,10 +26,11 @@ object ScenarioType {
   val