Bug 53750 - TestCompiler saves unnecessary entries in pairing collection
TestCompiler saves unnecessary entries in pairing collection
Status: RESOLVED FIXED
Product: JMeter
Classification: Unclassified
Component: Main
unspecified
All All
: P2 normal (vote)
: ---
Assigned To: JMeter issues mailing list
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2012-08-21 01:12 UTC by Sebb
Modified: 2012-08-21 01:17 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sebb 2012-08-21 01:12:36 UTC
The TestCompiler pairing collection is only used to decide whether to call the method ObjectPair.addTestElements().

Now that method contains the following code:

public void addTestElements() {
    if (parent instanceof Controller && (child instanceof Sampler || child instanceof Controller)) {
        parent.addTestElement(child);
    }
}

i.e. for some combinations of child and parent, it does nothing. There is therefore no reason even to store such entries in the pairing set; such entries just waste space.

The fix is to check the condition before checking the pairing set.
Comment 1 Sebb 2012-08-21 01:17:30 UTC
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