jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fschumac...@apache.org
Subject [jmeter] 02/02: Only process events in timer, when proxy recorded samplers
Date Wed, 06 May 2020 10:57:55 GMT
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

commit 20d3535cc0360c9ff539836973daea624ace62bf
Author: Felix Schumacher <felix.schumacher@internetallee.de>
AuthorDate: Wed May 6 12:51:30 2020 +0200

    Only process events in timer, when proxy recorded samplers
    
    Otherwise we get errors, when the Tree model is not
    initialized correctly in ProxyControl instances.
    The logic with this change is, that at the stage, when
    proxy recorded smaplers, the instance has to be set up
    correctly
    
    Follow-up to cee4de981d0165416a0d1783ac5ced84531d47a5
    Bugzilla Id: 64400
---
 .../main/java/org/apache/jmeter/protocol/http/proxy/ProxyControl.java | 4 ++++
 1 file changed, 4 insertions(+)

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 4780f3c..9016120 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
@@ -1134,6 +1134,10 @@ public class ProxyControl extends GenericController implements NonTestElement
{
     }
 
     private void putSamplesIntoModel(ActionEvent e) {
+        // return early, as JMeterTreeModel might not been initialized yet
+        if (sampleQueue.isEmpty()) {
+            return;
+        }
         final JMeterTreeModel treeModel = getJmeterTreeModel();
         while (!sampleQueue.isEmpty()) {
             SamplerInfo info = sampleQueue.poll();


Mime
View raw message