jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1827522 - in /jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/gui: ProxyControlGui.java RecorderDialog.java
Date Thu, 22 Mar 2018 18:34:55 GMT
Author: pmouawad
Date: Thu Mar 22 18:34:54 2018
New Revision: 1827522

URL: http://svn.apache.org/viewvc?rev=1827522&view=rev
Log:
Fix headless tests failure

Modified:
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/gui/ProxyControlGui.java
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/gui/RecorderDialog.java

Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/gui/ProxyControlGui.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/gui/ProxyControlGui.java?rev=1827522&r1=1827521&r2=1827522&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/gui/ProxyControlGui.java
(original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/gui/ProxyControlGui.java
Thu Mar 22 18:34:54 2018
@@ -24,6 +24,7 @@ import java.awt.Cursor;
 import java.awt.Dimension;
 import java.awt.GridBagConstraints;
 import java.awt.GridBagLayout;
+import java.awt.HeadlessException;
 import java.awt.datatransfer.DataFlavor;
 import java.awt.datatransfer.UnsupportedFlavorException;
 import java.awt.event.ActionEvent;
@@ -214,7 +215,7 @@ public class ProxyControlGui extends Log
     private JButton start;
     private JButton restart;
 
-    private RecorderDialog recorderDialog;
+    private transient RecorderDialog recorderDialog;
 
     //+ action names
     private static final String ACTION_STOP = "stop"; // $NON-NLS-1$
@@ -259,7 +260,11 @@ public class ProxyControlGui extends Log
         super();
         log.debug("Creating ProxyControlGui");
         init();
-        this.recorderDialog = new RecorderDialog(this);
+        try {
+            this.recorderDialog = new RecorderDialog(this);
+        } catch (HeadlessException ex) {
+            // Ignore as due to Headless tests
+        }
     }
 
     /** {@inheritDoc} */

Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/gui/RecorderDialog.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/gui/RecorderDialog.java?rev=1827522&r1=1827521&r2=1827522&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/gui/RecorderDialog.java
(original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/gui/RecorderDialog.java
Thu Mar 22 18:34:54 2018
@@ -72,6 +72,13 @@ public class RecorderDialog extends JDia
 
     private ProxyControlGui recorderGui;
 
+    /**
+     * For tests Only
+     */
+    public RecorderDialog() {
+        super();
+        // 
+    }
     public RecorderDialog(ProxyControlGui controlGui) {
         super((JFrame) null, JMeterUtils.getResString("proxy_recorder_dialog"), false); //$NON-NLS-1$
         this.recorderGui = controlGui;



Mime
View raw message