Skip to content

Commit

Permalink
Test: delay JMS server shutdown in JMS_TESTS.jmx
Browse files Browse the repository at this point in the history
  • Loading branch information
vlsi committed May 28, 2019
1 parent 3ec4ead commit b70fd96
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions bin/testfiles/JMS_TESTS.jmx
Original file line number Diff line number Diff line change
Expand Up @@ -1389,10 +1389,6 @@ propFloat 1.2</stringProp>
<stringProp name="ThreadGroup.delay"></stringProp>
</PostThreadGroup>
<hashTree>
<ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true">
<stringProp name="ConstantTimer.delay">5100</stringProp>
</ConstantTimer>
<hashTree/>
<JSR223Sampler guiclass="TestBeanGUI" testclass="JSR223Sampler" testname="BSS_stopActiveMQ" enabled="true">
<stringProp name="scriptLanguage">groovy</stringProp>
<stringProp name="parameters"></stringProp>
Expand All @@ -1403,9 +1399,15 @@ import org.apache.jmeter.util.JMeterUtils;
import org.apache.commons.io.FileUtils;

BrokerService broker = props.get(&quot;ACTIVEMQ_BROKER&quot;);
broker.stop();

FileUtils.deleteDirectory(new File(JMeterUtils.getJMeterHome(), &quot;bin/activemq-data&quot;));
Thread.start {
// The delay is to allow for JMS Publishers to close resources in testEnded event
// Note: JMeter warns for non-daemon threads which are active
// So the sleep duration should be less than 2sec
// Otherwise &quot;The following non-daemon threads are still running&quot; is printed
sleep(700)
broker.stop()
FileUtils.deleteDirectory(new File(JMeterUtils.getJMeterHome(), &quot;bin/activemq-data&quot;))
}
</stringProp>
</JSR223Sampler>
<hashTree/>
Expand Down

0 comments on commit b70fd96

Please sign in to comment.