Bug 29481 - fix reloading sample results so subresults not counted twice

git-svn-id: https://svn.apache.org/repos/asf/jakarta/jmeter/branches/rel-2-1@409495 13f79535-47bb-0310-9956-ffa450edef68

Former-commit-id: 5c126dc98b
This commit is contained in:
Sebastian Bazley 2006-05-25 22:37:14 +00:00
parent 09c0aaa7de
commit 41fcab3f23
4 changed files with 18 additions and 2 deletions

View File

@ -389,6 +389,21 @@ public class SampleResult implements Serializable {
subResult.setParent(this);
}
/**
* Add a subresult read from a results file.
*
* As for addSubResult(), except that the fields don't need to be accumulated
*
* @param subResult
*/
public void storeSubResult(SampleResult subResult) {
if (subResults == null) {
subResults = new ArrayList();
}
subResults.add(subResult);
subResult.setParent(this);
}
/**
* Gets the subresults associated with this sample.
*

View File

@ -500,7 +500,7 @@ public final class OldSaveService {
Configuration[] subResults = config.getChildren(SAMPLE_RESULT_TAG_NAME);
for (int i = 0; i < subResults.length; i++) {
result.addSubResult(getSampleResult(subResults[i]));
result.storeSubResult(getSampleResult(subResults[i]));
}
Configuration[] assResults = config.getChildren(ASSERTION_RESULT_TAG_NAME);

View File

@ -309,7 +309,7 @@ public class SampleResultConverter extends AbstractCollectionConverter {
if (subItem instanceof AssertionResult) {
res.addAssertionResult((AssertionResult) subItem);
} else if (subItem instanceof SampleResult) {
res.addSubResult((SampleResult) subItem);
res.storeSubResult((SampleResult) subItem);
} else if (nodeName.equals(TAG_RESPONSE_HEADER)) {
res.setResponseHeaders((String) subItem);
} else if (nodeName.equals(TAG_REQUEST_HEADER)) {

View File

@ -158,6 +158,7 @@ The XSL stylesheets also now accept either "rc" or "rs"</li>
<li>Bug 39533 - StatCalculator added wrong items</li>
<li>Bug 39599 - ConcurrentModificationException</li>
<li>HTTPSampler2 now handles Auto and Follow redirects correctly</li>
<li>Bug 29481 - fix reloading sample results so subresults not counted twice</li>
</ul>
<h4>Other changes</h4>