diff --git a/src/protocol/java/org/apache/jmeter/protocol/java/sampler/JavaSampler.java b/src/protocol/java/org/apache/jmeter/protocol/java/sampler/JavaSampler.java index 18c5524818..b03e272cdc 100644 --- a/src/protocol/java/org/apache/jmeter/protocol/java/sampler/JavaSampler.java +++ b/src/protocol/java/org/apache/jmeter/protocol/java/sampler/JavaSampler.java @@ -20,8 +20,10 @@ package org.apache.jmeter.protocol.java.sampler; import java.lang.reflect.Method; import java.util.Arrays; +import java.util.Collections; import java.util.HashSet; import java.util.Set; +import java.util.concurrent.ConcurrentHashMap; import org.apache.jmeter.config.Arguments; import org.apache.jmeter.config.ConfigTestElement; @@ -55,7 +57,8 @@ public class JavaSampler extends AbstractSampler implements TestStateListener { * Set used to register instances which implement tearDownTest. * This is used so that the JavaSamplerClient can be notified when the test ends. */ - private static final Set TEAR_DOWN_SET = new HashSet(); + private static final Set TEAR_DOWN_SET = + Collections.newSetFromMap(new ConcurrentHashMap()); /** * Property key representing the classname of the JavaSamplerClient to user. diff --git a/xdocs/changes.xml b/xdocs/changes.xml index 4f6d099a6f..1b10a12b97 100644 --- a/xdocs/changes.xml +++ b/xdocs/changes.xml @@ -146,6 +146,7 @@ Summary

Other Samplers

  • 58013Enable all protocols that are enabled on the default SSLContext for usage with the SMTP Sampler.
  • +
  • 58209JMeter hang when testing javasampler because HashMap.put() is called from multiple threads without sync.

Controllers