kcassell 2003/03/03 13:50:49
Modified: src/protocol/http/org/apache/jmeter/protocol/http/proxy
ProxyControl.java
Log:
New HTTPSampler elements will now no longer duplicate information from the
HttpDefaultsGui object, except for the port number, which is still redundant.
Revision Changes Path
1.14 +23 -10
jakarta-jmeter/src/protocol/http/org/apache/jmeter/protocol/http/proxy/ProxyControl.java
Index: ProxyControl.java
===================================================================
RCS file:
/home/cvs/jakarta-jmeter/src/protocol/http/org/apache/jmeter/protocol/http/proxy/ProxyControl.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- ProxyControl.java 14 Feb 2003 04:17:15 -0000 1.13
+++ ProxyControl.java 3 Mar 2003 21:50:49 -0000 1.14
@@ -70,11 +70,12 @@
import org.apache.jmeter.gui.GuiPackage;
import org.apache.jmeter.gui.tree.JMeterTreeModel;
import org.apache.jmeter.gui.tree.JMeterTreeNode;
+import org.apache.jmeter.protocol.http.config.gui.HttpDefaultsGui;
+import org.apache.jmeter.protocol.http.config.gui.UrlConfigGui;
import org.apache.jmeter.protocol.http.control.HeaderManager;
import org.apache.jmeter.protocol.http.control.RecordingController;
-import org.apache.jmeter.protocol.http.control.gui.HttpTestSampleGui;
-import org.apache.jmeter.protocol.http.gui.HeaderPanel;
import org.apache.jmeter.protocol.http.sampler.HTTPSampler;
+import org.apache.jmeter.threads.ThreadGroup;
import org.apache.jmeter.testelement.TestElement;
import org.apache.jmeter.util.JMeterUtils;
import org.apache.log.Hierarchy;
@@ -310,11 +311,14 @@
else
{
Enumeration enum = node.children();
+ String guiClassName = null;
while (enum.hasMoreElements())
{
JMeterTreeNode subNode = (JMeterTreeNode) enum.nextElement();
TestElement sample = (TestElement) subNode.createTestElement();
- if
(sample.getPropertyAsString(TestElement.GUI_CLASS).equals("org.apache.jmeter.protocol.http.config.gui.UrlConfigGui"))
+ guiClassName =
sample.getPropertyAsString(TestElement.GUI_CLASS);
+ if (guiClassName.equals(UrlConfigGui.class.getName())
+ || guiClassName.equals(HttpDefaultsGui.class.getName()))
{
urlConfig = sample;
break;
@@ -348,13 +352,22 @@
}
private void removeValuesFromSampler(HTTPSampler sampler, TestElement urlConfig)
{
- if (urlConfig != null &&
sampler.getDomain().equals(urlConfig.getProperty(HTTPSampler.DOMAIN)))
+ if (urlConfig != null)
{
- sampler.setDomain("");
- }
- if (urlConfig != null &&
sampler.getPath().equals(urlConfig.getProperty(HTTPSampler.PATH)))
- {
- sampler.setPath("");
+ if
(sampler.getDomain().equals(urlConfig.getProperty(HTTPSampler.DOMAIN)))
+ {
+ sampler.setDomain("");
+ }
+ /* Need to add some kind of "ignore-me" value
+ if (("" +
sampler.getPort()).equals(urlConfig.getProperty(HTTPSampler.PORT)))
+ {
+ sampler.setPort(0);
+ }
+ */
+ if (sampler.getPath().equals(urlConfig.getProperty(HTTPSampler.PATH)))
+ {
+ sampler.setPath("");
+ }
}
}
private boolean areMatched(HTTPSampler sampler, TestElement urlConfig)
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]