Bug 39792 - ClientJMeter synchronisation needed

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

Former-commit-id: 361684fd48
This commit is contained in:
Sebastian Bazley 2007-08-20 12:34:18 +00:00
parent f900df1357
commit 66124bad4a
2 changed files with 16 additions and 9 deletions

View File

@ -108,16 +108,22 @@ public class ClientJMeterEngine implements JMeterEngine, Runnable {
public void run() {
log.info("running clientengine run method");
testListeners = new SearchByClass(TestListener.class);
getTestTree().traverse(testListeners);
sampleListeners = new ConvertListeners();
// TODO this is a temporary fix - see bug 23487
try {
getTestTree().traverse(sampleListeners);
} catch (IndexOutOfBoundsException e) {
log.warn("Error replacing sample listeners", e);
HashTree testTree = getTestTree();
// TODO see bug 39792; should not do any harm to synch the code here
// @see http://issues.apache.org/bugzilla/show_bug.cgi?id=39792
synchronized(testTree) {
testTree.traverse(testListeners);
sampleListeners = new ConvertListeners();
// TODO this is a temporary fix - see bug 23487
// @see http://issues.apache.org/bugzilla/show_bug.cgi?id=23487
try { // probably no longer needed, now that the code is synchronised
testTree.traverse(sampleListeners);
} catch (IndexOutOfBoundsException e) {
log.warn("Error replacing sample listeners", e);
}
}
try {
JMeterContextService.startTest();
remote.setHost(host);

View File

@ -43,6 +43,7 @@
<li>Bug 42919 - Failure Message blank in CSV output [now records first non-blank message]</li>
<li>Add link to Extending JMeter PDF</li>
<li>Allow for quoted charset in Content-Type parsing</li>
<li>Bug 39792 - ClientJMeter synchronisation needed</li>
</ul>
<h4>Improvements since 2.3RC3</h4>