directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smckin...@apache.org
Subject [directory-fortress-core] branch jmeter-add-case updated: hostname override only via system prop
Date Sat, 24 Oct 2020 14:09:18 GMT
This is an automated email from the ASF dual-hosted git repository.

smckinney pushed a commit to branch jmeter-add-case
in repository https://gitbox.apache.org/repos/asf/directory-fortress-core.git


The following commit(s) were added to refs/heads/jmeter-add-case by this push:
     new cd0dab9  hostname override only via system prop
cd0dab9 is described below

commit cd0dab9b1861e3f3d21de0380dc7c27197278dc2
Author: Shawn McKinney <smckinney@symas.com>
AuthorDate: Sat Oct 24 09:09:08 2020 -0500

    hostname override only via system prop
---
 README.md                                                           | 5 +++++
 .../java/org/apache/directory/fortress/core/jmeter/UserBase.java    | 6 +++---
 src/test/jmeter/ftAddUser.jmx                                       | 5 -----
 src/test/jmeter/ftDelUser.jmx                                       | 5 -----
 4 files changed, 8 insertions(+), 13 deletions(-)

diff --git a/README.md b/README.md
index 9ed3e4d..a037f92 100644
--- a/README.md
+++ b/README.md
@@ -835,6 +835,11 @@ ________________________________________________________________________________
   mvn -Ploadtest-fortress-adduser jmeter:jmeter
   ```
 
+ G. Delete Users:
+  ```
+  mvn -Ploadtest-fortress-deluser jmeter:jmeter
+  ```
+
  The tests will run and produce measurements for throughput and latency.
 
 ___________________________________________________________________________________
diff --git a/src/test/java/org/apache/directory/fortress/core/jmeter/UserBase.java b/src/test/java/org/apache/directory/fortress/core/jmeter/UserBase.java
index 33b88c5..a4de4b3 100644
--- a/src/test/java/org/apache/directory/fortress/core/jmeter/UserBase.java
+++ b/src/test/java/org/apache/directory/fortress/core/jmeter/UserBase.java
@@ -117,12 +117,12 @@ public abstract class UserBase extends AbstractJavaSamplerClient
 
     private void init( JavaSamplerContext samplerContext )
     {
+        // Can override hostname via system property:
         hostname = System.getProperty( "hostname" );
-        if (StringUtils.isEmpty( hostname ))
+        if (! StringUtils.isEmpty( hostname ))
         {
-            hostname = samplerContext.getParameter( "hostname" );
+            System.setProperty( "fortress.host", hostname );
         }
-        System.setProperty( "fortress.host", hostname );
         qualifier = System.getProperty( "qualifier" );
         if (StringUtils.isEmpty( qualifier ))
         {
diff --git a/src/test/jmeter/ftAddUser.jmx b/src/test/jmeter/ftAddUser.jmx
index c11c693..45712ae 100644
--- a/src/test/jmeter/ftAddUser.jmx
+++ b/src/test/jmeter/ftAddUser.jmx
@@ -57,11 +57,6 @@
         <JavaSampler guiclass="JavaTestSamplerGui" testclass="JavaSampler" testname="Fortress
CheckAccess" enabled="true">
           <elementProp name="arguments" elementType="Arguments" guiclass="ArgumentsPanel"
testclass="Arguments" enabled="true">
             <collectionProp name="Arguments.arguments">
-              <elementProp name="hostname" elementType="Argument">
-                <stringProp name="Argument.name">hostname</stringProp>
-                <stringProp name="Argument.value">uk03</stringProp>
-                <stringProp name="Argument.metadata">=</stringProp>
-              </elementProp>
               <elementProp name="qualifier" elementType="Argument">
                 <stringProp name="Argument.name">qualifier</stringProp>
                 <stringProp name="Argument.value">Z</stringProp>
diff --git a/src/test/jmeter/ftDelUser.jmx b/src/test/jmeter/ftDelUser.jmx
index 2c4ce8c..7f7d478 100644
--- a/src/test/jmeter/ftDelUser.jmx
+++ b/src/test/jmeter/ftDelUser.jmx
@@ -57,11 +57,6 @@
         <JavaSampler guiclass="JavaTestSamplerGui" testclass="JavaSampler" testname="Fortress
CheckAccess" enabled="true">
           <elementProp name="arguments" elementType="Arguments" guiclass="ArgumentsPanel"
testclass="Arguments" enabled="true">
             <collectionProp name="Arguments.arguments">
-              <elementProp name="hostname" elementType="Argument">
-                <stringProp name="Argument.name">hostname</stringProp>
-                <stringProp name="Argument.value">uk03</stringProp>
-                <stringProp name="Argument.metadata">=</stringProp>
-              </elementProp>
               <elementProp name="qualifier" elementType="Argument">
                 <stringProp name="Argument.name">qualifier</stringProp>
                 <stringProp name="Argument.value">A</stringProp>


Mime
View raw message