Bug 47900 - Subscriber ThreadGroup won't stop
Summary: Subscriber ThreadGroup won't stop
Alias: None
Product: JMeter
Classification: Unclassified
Component: Main (show other bugs)
Version: 2.3.4
Hardware: All All
: P2 normal (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
Depends on:
Reported: 2009-09-24 09:18 UTC by Hiskill
Modified: 2009-11-03 06:21 UTC (History)
0 users

Patch to add interruptible to SubscriberSampler.java (3.07 KB, patch)
2009-10-15 14:02 UTC, Bob Yetman
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Hiskill 2009-09-24 09:18:31 UTC
I have threads configured with one Subscriber and one Publisher to run 10 times for JMS topic tests.  Publisher thread seems to be stopped at the end of test where as Subscriber thread seems to be still running, I can't stop it from the menu option either, here is the log:

2009/09/24 11:12:18 INFO  - jmeter.threads.JMeterThread: Thread finished: Publisher 2-1 
2009/09/24 11:12:18 INFO  - jmeter.engine.StandardJMeterEngine: Ending thread Publisher 2-1 
2009/09/24 11:13:52 INFO  - jmeter.gui.action.Start: Stopping test 
2009/09/24 11:13:52 INFO  - jmeter.threads.JMeterThread: Stopping: Subscribers 1-1 
2009/09/24 11:13:52 WARN  - jmeter.threads.JMeterThread: Sampler is not Interruptible: Subscriber 
2009/09/24 11:13:57 WARN  - jmeter.engine.StandardJMeterEngine: Thread won't exit: Subscribers 1-1 
2009/09/24 11:13:57 INFO  - jmeter.engine.StandardJMeterEngine: Notifying test listeners of end of test 
2009/09/24 11:13:57 INFO  - jmeter.protocol.jms.client.Publisher: Publisher closed 
2009/09/24 11:13:57 INFO  - jmeter.gui.util.JMeterMenuBar: setRunning(false,*local*) 
2009/09/24 11:13:57 INFO  - jmeter.engine.StandardJMeterEngine: Test has ended
Comment 1 Bob Yetman 2009-10-15 14:02:24 UTC
Created attachment 24382 [details]
Patch to add interruptible to SubscriberSampler.java

Here's a patch to SubscriberSampler.java to make it interruptible.   I've tested this at work, and it works for me.
Comment 2 Sebb 2009-11-03 06:21:29 UTC
Thanks for the patch.

I had to change the interrupted boolean flag to volatile, else the updated value might not be propagated to the running thread.

Also, the interrupt() method should not clear down the pool or counts.

URL: http://svn.apache.org/viewvc?rev=832426&view=rev
Bug 47900 - Allow JMS Subscriber Sampler to be interrupted