jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1198945 - in /jmeter/trunk: src/core/org/apache/jmeter/testelement/AbstractTestElement.java test/src/org/apache/jmeter/testelement/PackageTest.java xdocs/changes.xml
Date Mon, 07 Nov 2011 21:21:26 GMT
Author: pmouawad
Date: Mon Nov  7 21:21:26 2011
New Revision: 1198945

URL: http://svn.apache.org/viewvc?rev=1198945&view=rev
Log:
Bug 50799 - Having a non-HTTP sampler in a http test plan prevents multiple header managers
from working

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/testelement/AbstractTestElement.java
    jmeter/trunk/test/src/org/apache/jmeter/testelement/PackageTest.java
    jmeter/trunk/xdocs/changes.xml

Modified: jmeter/trunk/src/core/org/apache/jmeter/testelement/AbstractTestElement.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/testelement/AbstractTestElement.java?rev=1198945&r1=1198944&r2=1198945&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/testelement/AbstractTestElement.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/testelement/AbstractTestElement.java Mon Nov 
7 21:21:26 2011
@@ -256,21 +256,38 @@ public abstract class AbstractTestElemen
         return jmp instanceof NullProperty ? defaultValue : jmp.getStringValue();
     }
 
-    protected void addProperty(JMeterProperty property) {
+    /**
+     * Add property to test element
+     * @param property {@link JMeterProperty} to add to current Test Element
+     * @param clone clone property
+     */
+    protected void addProperty(JMeterProperty property, boolean clone) {
+    	JMeterProperty propertyToPut = property;
+    	if(clone) {
+    		propertyToPut = property.clone();
+    	}
         if (isRunningVersion()) {
-            setTemporary(property);
+        	setTemporary(propertyToPut);
         } else {
             clearTemporary(property);
         }
         JMeterProperty prop = getProperty(property.getName());
 
         if (prop instanceof NullProperty || (prop instanceof StringProperty && prop.getStringValue().equals("")))
{
-            propMap.put(property.getName(), property);
+        	propMap.put(property.getName(), propertyToPut);
         } else {
-            prop.mergeIn(property);
+            prop.mergeIn(propertyToPut);
         }
     }
 
+    /**
+     * Add property to test element without cloning it
+     * @param property {@link JMeterProperty}
+     */
+    protected void addProperty(JMeterProperty property) {
+        addProperty(property, false);
+    }
+
     protected void clearTemporary(JMeterProperty property) {
         if (temporaryProperties != null) {
             temporaryProperties.remove(property);
@@ -382,7 +399,7 @@ public abstract class AbstractTestElemen
         PropertyIterator iter = element.propertyIterator();
         while (iter.hasNext()) {
             JMeterProperty prop = iter.next();
-            addProperty(prop);
+            addProperty(prop, false);
         }
     }
 

Modified: jmeter/trunk/test/src/org/apache/jmeter/testelement/PackageTest.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/test/src/org/apache/jmeter/testelement/PackageTest.java?rev=1198945&r1=1198944&r2=1198945&view=diff
==============================================================================
--- jmeter/trunk/test/src/org/apache/jmeter/testelement/PackageTest.java (original)
+++ jmeter/trunk/test/src/org/apache/jmeter/testelement/PackageTest.java Mon Nov  7 21:21:26
2011
@@ -41,7 +41,7 @@ public class PackageTest extends TestCas
     }
 
     // Test needs to run in this package in order to give access to AbstractTestElement.addProperty()

-    public void DISABLEDtestBug50799() throws Exception {
+    public void testBug50799() throws Exception {
         HeaderManager headerManager = new HeaderManager();
         headerManager.add(new Header("1stLevelTestHeader", "testValue1"));
         HeaderManager headerManager2 = new HeaderManager();

Modified: jmeter/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.xml?rev=1198945&r1=1198944&r2=1198945&view=diff
==============================================================================
--- jmeter/trunk/xdocs/changes.xml (original)
+++ jmeter/trunk/xdocs/changes.xml Mon Nov  7 21:21:26 2011
@@ -145,6 +145,7 @@ these occurs, Sampler is marked as faile
 <li>Bug 51733 - SyncTimer is messed up if you a interrupt a test plan</li>
 <li>Bug 52118 - New toolbar : shutdown and stop buttons not disabled when no test is
running</li>
 <li>Bug 52125 - StatCalculator.addAll(StatCalculator calc) joins incorrect if there
are more samples with the same response time in one of the TreeMap</li>
+<li>Bug 50799 - Having a non-HTTP sampler in a http test plan prevents multiple header
managers from working</li>
 </ul>
 
 <!-- =================== Improvements =================== -->



Mime
View raw message