jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1763841 - in /jmeter/trunk: src/components/org/apache/jmeter/config/CSVDataSet.java xdocs/changes.xml
Date Fri, 07 Oct 2016 21:36:53 GMT
Author: pmouawad
Date: Fri Oct  7 21:36:52 2016
New Revision: 1763841

URL: http://svn.apache.org/viewvc?rev=1763841&view=rev
Log:
Bug 60221 - CSV DataSet : trim variable names
Bugzilla Id: 60221

Modified:
    jmeter/trunk/src/components/org/apache/jmeter/config/CSVDataSet.java
    jmeter/trunk/xdocs/changes.xml

Modified: jmeter/trunk/src/components/org/apache/jmeter/config/CSVDataSet.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/config/CSVDataSet.java?rev=1763841&r1=1763840&r2=1763841&view=diff
==============================================================================
--- jmeter/trunk/src/components/org/apache/jmeter/config/CSVDataSet.java (original)
+++ jmeter/trunk/src/components/org/apache/jmeter/config/CSVDataSet.java Fri Oct  7 21:36:52
2016
@@ -151,7 +151,7 @@ public class CSVDataSet extends ConfigTe
         String delim = getDelimiter();
         if (delim.equals("\\t")) { // $NON-NLS-1$
             delim = "\t";// Make it easier to enter a Tab // $NON-NLS-1$
-        } else if (delim.length()==0){
+        } else if (delim.isEmpty()){
             log.warn("Empty delimiter converted to ','");
             delim=",";
         }
@@ -186,6 +186,7 @@ public class CSVDataSet extends ConfigTe
                 server.reserveFile(_fileName, getFileEncoding(), alias);
                 vars = JOrphanUtils.split(names, ","); // $NON-NLS-1$
             }
+            trimVarNames(vars);
         }
            
         // TODO: fetch this once as per vars above?
@@ -215,6 +216,16 @@ public class CSVDataSet extends ConfigTe
         }
     }
 
+    /**
+     * trim content of array varNames
+     * @param varsNames
+     */
+    private void trimVarNames(String[] varsNames) {
+        for (int i = 0; i < varsNames.length; i++) {
+            varsNames[i] = varsNames[i].trim();
+        }
+    }
+
     /**
      * @return Returns the filename.
      */

Modified: jmeter/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.xml?rev=1763841&r1=1763840&r2=1763841&view=diff
==============================================================================
--- jmeter/trunk/xdocs/changes.xml [utf-8] (original)
+++ jmeter/trunk/xdocs/changes.xml [utf-8] Fri Oct  7 21:36:52 2016
@@ -74,13 +74,12 @@ Summary
     <li>Since 3.1 version, <code>jmeter.save.saveservice.connect_time</code>
property value is <code>true</code>, meaning CSV file for results will contain
an additional column containing connection time, see <bugzilla>60106</bugzilla></li>
     <li>Since 3.1 version, Random Timer subclasses (Gaussian Random Timer, Uniform
Random Timer and Poisson Random Timer) implement interface <code><a href="./api/org/apache/jmeter/timers/ModifiableTimer.html">org.apache.jmeter.timers.ModifiableTimer</a></code></li>
     <li>Since 3.1 version, if you don't select any language in JSR223 Test Elements,
Apache Groovy language will be used. See <bugzilla>59945</bugzilla></li>
-    <li>Since 3.1 version, JSON Path Post Processor has been renamed to JSON Path Extractor,
see <bugzilla>60220</bugzilla></li>
-    <li>Since 3.1 version, deprecated elements Distribution Graph and Spline Visualizer
were removed, see <bugzilla>60222</bugzilla></li>
+    <li>Since 3.1 version, CSV DataSet now trims variable names to avoid issues due
to spaces between variables names when configuring CSV DataSet. This should not have any impact
for you unless you use space at the begining or end of your variable names. See <bugzilla>60221</bugzilla></li>
 </ul>
 
 <h3>Deprecated and removed elements</h3>
 <ul>
-    <li>Sample removed element</li>
+    <li>Since 3.1 version, deprecated elements Distribution Graph and Spline Visualizer
were removed, see <bugzilla>60222</bugzilla></li>
 </ul>
 
 <!-- =================== Improvements =================== -->
@@ -133,6 +132,7 @@ Summary
     <li><bug>60018</bug>Timer : Add a factor to apply on pauses. Partly
based on a patch by Ubik Load Pack (support at ubikloadpack.com)</li>
     <li><bug>60203</bug>Use more available space for textarea in XPath
Assertion.</li>
     <li><bug>60220</bug>Rename JSON Path Post Processor to JSON Path Extractor</li>
+    <li><bug>60221</bug>CSV DataSet : trim variable names</li>
 </ul>
 
 <h3>Functions</h3>



Mime
View raw message