You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by se...@apache.org on 2012/08/21 03:16:23 UTC
svn commit: r1375362 - in /jmeter/trunk:
src/core/org/apache/jmeter/threads/TestCompiler.java xdocs/changes.xml
Author: sebb
Date: Tue Aug 21 01:16:22 2012
New Revision: 1375362
URL: http://svn.apache.org/viewvc?rev=1375362&view=rev
Log:
TestCompiler saves unnecessary entries in pairing collection
Bugzilla Id: 53750
Modified:
jmeter/trunk/src/core/org/apache/jmeter/threads/TestCompiler.java
jmeter/trunk/xdocs/changes.xml
Modified: jmeter/trunk/src/core/org/apache/jmeter/threads/TestCompiler.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/threads/TestCompiler.java?rev=1375362&r1=1375361&r2=1375362&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/threads/TestCompiler.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/threads/TestCompiler.java Tue Aug 21 01:16:22 2012
@@ -140,10 +140,13 @@ public class TestCompiler implements Has
if (stack.size() > 0) {
TestElement parent = stack.getLast();
ObjectPair pair = new ObjectPair(child, parent);
- synchronized (pairing) {// Called from multiple threads
- if (!pairing.contains(pair)) {
- pair.addTestElements();
- pairing.add(pair);
+ // Bug 53750: this condition used to be in ObjectPair#addTestElements()
+ if (parent instanceof Controller && (child instanceof Sampler || child instanceof Controller)) {
+ synchronized (pairing) {// Called from multiple threads
+ if (!pairing.contains(pair)) {
+ parent.addTestElement(child);
+ pairing.add(pair);
+ }
}
}
}
@@ -263,12 +266,6 @@ public class TestCompiler implements Has
this.parent = parent;
}
- public void addTestElements() {
- if (parent instanceof Controller && (child instanceof Sampler || child instanceof Controller)) {
- parent.addTestElement(child);
- }
- }
-
/** {@inheritDoc} */
@Override
public int hashCode() {
Modified: jmeter/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.xml?rev=1375362&r1=1375361&r2=1375362&view=diff
==============================================================================
--- jmeter/trunk/xdocs/changes.xml (original)
+++ jmeter/trunk/xdocs/changes.xml Tue Aug 21 01:16:22 2012
@@ -114,6 +114,7 @@ JSR223 Test Elements using Script file a
<li><bugzilla>53365</bugzilla> - JSR223TestElement should cache ScriptEngineManager</li>
<li><bugzilla>53520</bugzilla> - JSR223 Elements : Use Compilable interface to improve performances on File scripts</li>
<li><bugzilla>53501</bugzilla> - Synchronization timer blocks test end.</li>
+<li><bugzilla>53750</bugzilla> - TestCompiler saves unnecessary entries in pairing collection</li>
</ul>
<!-- =================== Improvements =================== -->