Am 17.06.20 um 12:40 schrieb Philippe Mouawad: > Hi Felix, > Thanks for the fix. > Thinking about it, what would happen to long requests for which response > would arrive after stop ? > > They would not be consumed and only added if a new start is done right ? Yes, I think that is what would happen (that is why I chose the global timer in the first place). But I really don't have a better idea at the moment. > > Note this is edgy and there is a bugzilla that complains about long running > samplerresuit being added much later.
+1 Thanks for your debugging session. How did you find the cause? git bisect or rather informed guessing ;)? Felix > > > Regards > > On Wednesday, June 17, 2020, <[email protected]> wrote: > >> This is an automated email from the ASF dual-hosted git repository. >> >> fschumacher pushed a commit to branch master >> in repository https://gitbox.apache.org/repos/asf/jmeter.git >> >> >> The following commit(s) were added to refs/heads/master by this push: >> new 913735d Fix ProxyControl timer that prevents correct shutdown >> 913735d is described below >> >> commit 913735db54bf5a2e0a1461aee0e110df19512424 >> Author: Felix Schumacher <[email protected]> >> AuthorDate: Wed Jun 17 12:20:21 2020 +0200 >> >> Fix ProxyControl timer that prevents correct shutdown >> >> Regression introduced with Bug 64400 >> >> Bugzilla Id: 64479 >> --- >> .../java/org/apache/jmeter/protocol/http/proxy/ProxyControl.java | 9 >> ++++++++- >> xdocs/changes.xml | 1 + >> 2 files changed, 9 insertions(+), 1 deletion(-) >> >> diff --git a/src/protocol/http/src/main/java/org/apache/jmeter/ >> protocol/http/proxy/ProxyControl.java b/src/protocol/http/src/main/ >> java/org/apache/jmeter/protocol/http/proxy/ProxyControl.java >> index 9016120..3d86b4d 100644 >> --- a/src/protocol/http/src/main/java/org/apache/jmeter/ >> protocol/http/proxy/ProxyControl.java >> +++ b/src/protocol/http/src/main/java/org/apache/jmeter/ >> protocol/http/proxy/ProxyControl.java >> @@ -286,12 +286,13 @@ public class ProxyControl extends GenericController >> implements NonTestElement { >> // accessed from Swing-Thread, only >> private String oldPrefix = null; >> >> + private transient javax.swing.Timer sampleWorkerTimer; >> + >> public ProxyControl() { >> setPort(DEFAULT_PORT); >> setExcludeList(new HashSet<>()); >> setIncludeList(new HashSet<>()); >> setCaptureHttpHeaders(true); // maintain original behaviour >> - new javax.swing.Timer(200, this::putSamplesIntoModel).start(); >> } >> >> /** >> @@ -508,6 +509,8 @@ public class ProxyControl extends GenericController >> implements NonTestElement { >> log.error("Could not initialise key store", e); >> throw e; >> } >> + sampleWorkerTimer = new javax.swing.Timer(200, >> this::putSamplesIntoModel); >> + sampleWorkerTimer.start(); >> notifyTestListenersOfStart(); >> try { >> server = new Daemon(getPort(), this); >> @@ -738,6 +741,10 @@ public class ProxyControl extends GenericController >> implements NonTestElement { >> notifyTestListenersOfEnd(); >> server = null; >> } >> + if (sampleWorkerTimer != null) { >> + sampleWorkerTimer.stop(); >> + sampleWorkerTimer = null; >> + } >> } >> >> public String[] getCertificateDetails() { >> diff --git a/xdocs/changes.xml b/xdocs/changes.xml >> index aaeb561..2e31684 100644 >> --- a/xdocs/changes.xml >> +++ b/xdocs/changes.xml >> @@ -129,6 +129,7 @@ Summary >> >> <h3>HTTP Samplers and Test Script Recorder</h3> >> <ul> >> + <li><bug>64479</bug>Regression: HTTP(s) Script Recorder prevents >> proper shutdown in non-GUI mode</li> >> </ul> >> >> <h3>Other Samplers</h3> >> >>
