jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1527117 - /jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/config/gui/UrlConfigGui.java
Date Fri, 27 Sep 2013 23:09:33 GMT
Author: pmouawad
Date: Fri Sep 27 23:09:33 2013
New Revision: 1527117

URL: http://svn.apache.org/r1527117
Log:
Bug 55606 - Use JSyntaxtTextArea for Http Request, JMS Test Elements
Fix test case failure in Headless mode
Bugzilla Id: 55606

Modified:
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/config/gui/UrlConfigGui.java

Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/config/gui/UrlConfigGui.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/config/gui/UrlConfigGui.java?rev=1527117&r1=1527116&r2=1527117&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/config/gui/UrlConfigGui.java
(original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/config/gui/UrlConfigGui.java
Fri Sep 27 23:09:33 2013
@@ -22,6 +22,7 @@ import java.awt.BorderLayout;
 import java.awt.Component;
 import java.awt.FlowLayout;
 import java.awt.Font;
+import java.awt.HeadlessException;
 
 import javax.swing.BorderFactory;
 import javax.swing.Box;
@@ -53,6 +54,8 @@ import org.apache.jmeter.testelement.pro
 import org.apache.jmeter.testelement.property.TestElementProperty;
 import org.apache.jmeter.util.JMeterUtils;
 import org.apache.jorphan.gui.JLabeledChoice;
+import org.apache.jorphan.logging.LoggingManager;
+import org.apache.log.Logger;
 
 /**
  * Basic URL / HTTP Request configuration:
@@ -65,6 +68,8 @@ public class UrlConfigGui extends JPanel
 
     private static final long serialVersionUID = 240L;
 
+    private static final Logger log = LoggingManager.getLoggerForClass();
+
     private static final int TAB_PARAMETERS = 0;
     
     private static final int TAB_RAW_BODY = 1;
@@ -321,25 +326,31 @@ public class UrlConfigGui extends JPanel
     }
 
     private void init() {// called from ctor, so must not be overridable
-        this.setLayout(new BorderLayout());
-
-        // WEB REQUEST PANEL
-        JPanel webRequestPanel = new JPanel();
-        webRequestPanel.setLayout(new BorderLayout());
-        webRequestPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(),
-                JMeterUtils.getResString("web_request"))); // $NON-NLS-1$
-
-        JPanel northPanel = new JPanel();
-        northPanel.setLayout(new BoxLayout(northPanel, BoxLayout.Y_AXIS));
-        northPanel.add(getProtocolAndMethodPanel());
-        northPanel.add(getPathPanel());
-
-        webRequestPanel.add(northPanel, BorderLayout.NORTH);
-        webRequestPanel.add(getParameterPanel(), BorderLayout.CENTER);
-
-        this.add(getWebServerTimeoutPanel(), BorderLayout.NORTH);
-        this.add(webRequestPanel, BorderLayout.CENTER);
-        this.add(getProxyServerPanel(), BorderLayout.SOUTH);
+    	try {
+	        this.setLayout(new BorderLayout());
+	
+	        // WEB REQUEST PANEL
+	        JPanel webRequestPanel = new JPanel();
+	        webRequestPanel.setLayout(new BorderLayout());
+	        webRequestPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(),
+	                JMeterUtils.getResString("web_request"))); // $NON-NLS-1$
+	
+	        JPanel northPanel = new JPanel();
+	        northPanel.setLayout(new BoxLayout(northPanel, BoxLayout.Y_AXIS));
+	        northPanel.add(getProtocolAndMethodPanel());
+	        northPanel.add(getPathPanel());
+	
+	        webRequestPanel.add(northPanel, BorderLayout.NORTH);
+	        webRequestPanel.add(getParameterPanel(), BorderLayout.CENTER);
+	
+	        this.add(getWebServerTimeoutPanel(), BorderLayout.NORTH);
+	        this.add(webRequestPanel, BorderLayout.CENTER);
+	        this.add(getProxyServerPanel(), BorderLayout.SOUTH);
+    	}
+        catch (HeadlessException e){
+        	// When running in Headless mode, avoid unit tests failures
+            log.warn(e.toString());
+        } 
     }
 
     /**



Mime
View raw message