You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jmeter-dev@jakarta.apache.org by ms...@apache.org on 2002/10/21 19:02:29 UTC

cvs commit: jakarta-jmeter/src/protocol/http/org/apache/jmeter/protocol/http/sampler HTTPSampler.java

mstover1    2002/10/21 10:02:29

  Modified:    src/protocol/http/org/apache/jmeter/protocol/http/modifier
                        ParamModifier.java
               src/protocol/http/org/apache/jmeter/protocol/http/modifier/gui
                        ParamModifierGui.java
               src/protocol/http/org/apache/jmeter/protocol/http/sampler
                        HTTPSampler.java
  Log:
  Fixing port for HTTPSampler and HTTP Request Defaults
  Fixing parameter mask modifier use in nongui test
  
  Revision  Changes    Path
  1.2       +26 -8     jakarta-jmeter/src/protocol/http/org/apache/jmeter/protocol/http/modifier/ParamModifier.java
  
  Index: ParamModifier.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jmeter/src/protocol/http/org/apache/jmeter/protocol/http/modifier/ParamModifier.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ParamModifier.java	11 Aug 2002 19:24:51 -0000	1.1
  +++ ParamModifier.java	21 Oct 2002 17:02:29 -0000	1.2
  @@ -1,14 +1,14 @@
   package org.apache.jmeter.protocol.http.modifier;
   
  -import org.apache.jmeter.testelement.AbstractTestElement;
  -import org.apache.jmeter.samplers.Entry;
  -import org.apache.jmeter.config.Modifier;
  +import java.io.Serializable;
  +import java.util.Iterator;
  +
   import org.apache.jmeter.config.Argument;
  -import org.apache.jmeter.samplers.Sampler;
  +import org.apache.jmeter.config.Modifier;
   import org.apache.jmeter.protocol.http.sampler.HTTPSampler;
  -
  -import java.io.Serializable;
  -import java.util.*;
  +import org.apache.jmeter.samplers.Sampler;
  +import org.apache.jmeter.testelement.AbstractTestElement;
  +import org.apache.jmeter.testelement.TestListener;
   
   /**
    *  <P>
  @@ -34,7 +34,7 @@
    *@created    Jan 18, 2002
    *@see        ParamMask
    */
  -public class ParamModifier extends AbstractTestElement implements Modifier, Serializable
  +public class ParamModifier extends AbstractTestElement implements TestListener,Modifier, Serializable
   {
   
   	/*
  @@ -65,6 +65,24 @@
   	{
   		return (ParamMask)getProperty(MASK);
   	}
  +	
  +	public void testStarted()
  +	{
  +		getMask().resetValue();
  +	}
  +	
  +	public void testStarted(String host)
  +	{
  +		getMask().resetValue();
  +	}
  +	
  +	public void testEnded()
  +	{
  +	}
  +	
  +	public void testEnded(String host)
  +	{
  +	}	
   
   	/*
   	 *  ----------------------------------------------------------------------------------------------
  
  
  
  1.4       +1 -2      jakarta-jmeter/src/protocol/http/org/apache/jmeter/protocol/http/modifier/gui/ParamModifierGui.java
  
  Index: ParamModifierGui.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jmeter/src/protocol/http/org/apache/jmeter/protocol/http/modifier/gui/ParamModifierGui.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ParamModifierGui.java	17 Oct 2002 19:47:19 -0000	1.3
  +++ ParamModifierGui.java	21 Oct 2002 17:02:29 -0000	1.4
  @@ -94,7 +94,6 @@
   		mask.setIncrement(Long.parseLong(_increment.getText()));
   		mask.setUpperBound(Long.parseLong(_upperBound.getText()));
   		mask.setSuffix(_suffix.getText());
  -		mask.resetValue();
   		return modifier;
   	}
   
  
  
  
  1.14      +7 -4      jakarta-jmeter/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSampler.java
  
  Index: HTTPSampler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jmeter/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSampler.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- HTTPSampler.java	30 Aug 2002 14:43:20 -0000	1.13
  +++ HTTPSampler.java	21 Oct 2002 17:02:29 -0000	1.14
  @@ -226,8 +226,11 @@
   		int port = getPropertyAsInt(PORT);
   		if (port == 0)
   		{
  -			port = 80;
  -			setPort(port);
  +			if("https".equalsIgnoreCase(getProtocol()))
  +			{
  +				return 443;
  +			}
  +			return 80;
   		}
   		return port;
   	}
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>