https://issues.apache.org/bugzilla/show_bug.cgi?id=50799

Philippe Mouawad <p.moua...@ubik-ingenierie.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |p.mouawad@ubik-ingenierie.c
                   |                            |om

--- Comment #2 from Philippe Mouawad <p.moua...@ubik-ingenierie.com> 2011-11-06 
17:11:19 UTC ---
This issue is due to the following:
JMeterThread#process_sampler calls :
SamplePackage pack = compiler.configureSampler(current);

This calls :
configureWithConfigElements(sampler, pack.getConfigs());
Which ends up calling:
mergeIn()
This methods iterates over HeaderManager properties and adds them to
AbstractTestElement as temporary properties but it adds their reference not a
clone.


So AbstractTestElement ends up sharing a CollectionProperty with HeaderManager
When sampler.recoverRunningVersion() is called in
SamplePackage#recoverRunningVersion(), it calls prop.recoverRunningVersion(this
being  AbstractTestElement) 

This calls recoverRunningVersionOfSubElements(this being  AbstractTestElement)
This enters this part of code:
if (owner.isTemporary(prop)) {
   iter.remove();
}
And ends up cleaning HeaderManager collection.


So I think the issue is due to the fact that A CollectionProperty is shared
between HeaderManager and AbstractTestElement.

You can see this behaviour by just disabling the 2 HTTP Samplers and keeping
only the BeanShellSampler or any other AbstractTestElement except for those who
redefined addTestElement (as it's the case for HttpSamplerBase).


I attach a patch (not committed) because I need further advice from Sebb
regarding the fix and its impacts.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

Reply via email to