Bug 47900

Summary: Subscriber ThreadGroup won't stop
Product: JMeter - Now in Github Reporter: Hiskill <hikiran>
Component: MainAssignee: JMeter issues mailing list <issues>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: 2.3.4   
Target Milestone: ---   
Hardware: All   
OS: All   
Attachments: Patch to add interruptible to SubscriberSampler.java

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
Log:
Bug 47900 - Allow JMS Subscriber Sampler to be interrupted
Comment 3 The ASF infrastructure team 2022-09-24 20:37:43 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/2286