svn commit: r936117 - in /jakarta/jmeter/trunk/test/src/org/apache: commons/cli/avalon/ jmeter/control/ jmeter/protocol/http/config/ jmeter/samplers/ jorphan/collections/

2010-04-20 Thread sebb
Author: sebb
Date: Wed Apr 21 00:00:09 2010
New Revision: 936117

URL: http://svn.apache.org/viewvc?rev=936117view=rev
Log:
Use assertEquals(exp,actual) rather than assertTrue(actual==exp) to give more 
info on failure

Modified:

jakarta/jmeter/trunk/test/src/org/apache/commons/cli/avalon/ClutilTestCase.java

jakarta/jmeter/trunk/test/src/org/apache/jmeter/control/TestRandomOrderController.java

jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/config/UrlConfigTest.java

jakarta/jmeter/trunk/test/src/org/apache/jmeter/samplers/TestSampleResult.java

jakarta/jmeter/trunk/test/src/org/apache/jmeter/samplers/TestSampleSaveConfiguration.java

jakarta/jmeter/trunk/test/src/org/apache/jorphan/collections/PackageTest.java

Modified: 
jakarta/jmeter/trunk/test/src/org/apache/commons/cli/avalon/ClutilTestCase.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/test/src/org/apache/commons/cli/avalon/ClutilTestCase.java?rev=936117r1=936116r2=936117view=diff
==
--- 
jakarta/jmeter/trunk/test/src/org/apache/commons/cli/avalon/ClutilTestCase.java 
(original)
+++ 
jakarta/jmeter/trunk/test/src/org/apache/commons/cli/avalon/ClutilTestCase.java 
Wed Apr 21 00:00:09 2010
@@ -761,7 +761,7 @@ public final class ClutilTestCase extend
 assertEquals((clOptions1.get(2)).getDescriptor().getId(), ALL_OPT);
 assertEquals((clOptions1.get(3)).getDescriptor().getId(), CLEAR1_OPT);
 
-assertTrue(parser1.getUnparsedArgs()[0].equals(ler));
+assertEquals(ler,parser1.getUnparsedArgs()[0]);
 
 final CLArgsParser parser2 = new 
CLArgsParser(parser1.getUnparsedArgs(), options2);
 

Modified: 
jakarta/jmeter/trunk/test/src/org/apache/jmeter/control/TestRandomOrderController.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/test/src/org/apache/jmeter/control/TestRandomOrderController.java?rev=936117r1=936116r2=936117view=diff
==
--- 
jakarta/jmeter/trunk/test/src/org/apache/jmeter/control/TestRandomOrderController.java
 (original)
+++ 
jakarta/jmeter/trunk/test/src/org/apache/jmeter/control/TestRandomOrderController.java
 Wed Apr 21 00:00:09 2010
@@ -46,13 +46,13 @@ public class TestRandomOrderController e
 }
 usedSamplers.add(samplerName);
 }
-assertTrue(All samplers were returned, usedSamplers.size() == 4);
+assertEquals(All samplers were returned, 4, usedSamplers.size());
 }
 
 public void testRandomOrderNoElements() {
 RandomOrderController roc = new RandomOrderController();
 roc.initialize();
-assertTrue(roc.next() == null);
+assertNull(roc.next());
 }
 
 public void testRandomOrderOneElement() {
@@ -68,6 +68,6 @@ public class TestRandomOrderController e
 }
 usedSamplers.add(samplerName);
 }
-assertTrue(All samplers were returned, usedSamplers.size() == 1);
+assertEquals(All samplers were returned, 1, usedSamplers.size());
 }
 }

Modified: 
jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/config/UrlConfigTest.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/config/UrlConfigTest.java?rev=936117r1=936116r2=936117view=diff
==
--- 
jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/config/UrlConfigTest.java
 (original)
+++ 
jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/config/UrlConfigTest.java
 Wed Apr 21 00:00:09 2010
@@ -59,14 +59,14 @@ public class UrlConfigTest extends JMete
 }
 
 public void testSimpleConfig() {
-assertTrue(config.getName().equals(Full Config));
-assertEquals(config.getDomain(), www.lazer.com);
+assertEquals(Full Config, config.getName());
+assertEquals(www.lazer.com, config.getDomain());
 }
 
 public void testOverRide() {
 JMeterProperty jmp = partialConfig.getProperty(HTTPSamplerBase.DOMAIN);
 assertTrue(jmp instanceof NullProperty);
-assertTrue(new NullProperty(HTTPSamplerBase.DOMAIN).equals(jmp));
+assertEquals(jmp, new NullProperty(HTTPSamplerBase.DOMAIN));
 partialConfig.addTestElement(defaultConfig);
 
assertEquals(partialConfig.getPropertyAsString(HTTPSamplerBase.DOMAIN), 
www.xerox.com);
 assertEquals(partialConfig.getPropertyAsString(HTTPSamplerBase.PATH), 
main.jsp);

Modified: 
jakarta/jmeter/trunk/test/src/org/apache/jmeter/samplers/TestSampleResult.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/test/src/org/apache/jmeter/samplers/TestSampleResult.java?rev=936117r1=936116r2=936117view=diff

svn commit: r935592 - in /jakarta/jmeter/trunk/xdocs: changes.xml usermanual/index.xml

2010-04-19 Thread sebb
Author: sebb
Date: Mon Apr 19 14:29:48 2010
New Revision: 935592

URL: http://svn.apache.org/viewvc?rev=935592view=rev
Log:
Bug 49149 - usermanual/index.html has typo in link to Regular Expressions page

Modified:
jakarta/jmeter/trunk/xdocs/changes.xml
jakarta/jmeter/trunk/xdocs/usermanual/index.xml

Modified: jakarta/jmeter/trunk/xdocs/changes.xml
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/xdocs/changes.xml?rev=935592r1=935591r2=935592view=diff
==
--- jakarta/jmeter/trunk/xdocs/changes.xml (original)
+++ jakarta/jmeter/trunk/xdocs/changes.xml Mon Apr 19 14:29:48 2010
@@ -135,6 +135,7 @@ The XPath Assertion and XPath Extractor 
 liBeanInfoSupport now caches getBeanDescriptor() - should avoid an NPE on 
non-Sun JVMs when using CSVDataSet (and some other TestBeans)/li
 liBug 48350 - Deadlock on distributed testing with 2 clients/li
 liBug 48901 - Endless wait by adding Synchronizing Timer/li
+liBug 49149 - usermanual/index.html has typo in link to Regular 
Expressions page/li
 /ul
 
 !--  --

Modified: jakarta/jmeter/trunk/xdocs/usermanual/index.xml
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/xdocs/usermanual/index.xml?rev=935592r1=935591r2=935592view=diff
==
--- jakarta/jmeter/trunk/xdocs/usermanual/index.xml (original)
+++ jakarta/jmeter/trunk/xdocs/usermanual/index.xml Mon Apr 19 14:29:48 2010
@@ -188,7 +188,7 @@
 
  lia name=component_reference/a href=component_reference.html18. 
Component Reference/a/li
  lia name=functions/a href=functions.html19. Functions/a/li
- lia name=regex/a href=regukar_expressions.html20. Regular 
Expressions/a/li
+ lia name=regex/a href=regular_expressions.html20. Regular 
Expressions/a/li
  lia name=glossary/a href=glossary.html21. Glossary/a/li
 /ul
 /subsection



-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



svn commit: r930988 - /jakarta/jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/client/InitialContextFactory.java

2010-04-05 Thread sebb
Author: sebb
Date: Tue Apr  6 00:23:16 2010
New Revision: 930988

URL: http://svn.apache.org/viewvc?rev=930988view=rev
Log:
Javadoc; no need for lookupTopic() to be synch.

Modified:

jakarta/jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/client/InitialContextFactory.java

Modified: 
jakarta/jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/client/InitialContextFactory.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/client/InitialContextFactory.java?rev=930988r1=930987r2=930988view=diff
==
--- 
jakarta/jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/client/InitialContextFactory.java
 (original)
+++ 
jakarta/jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/client/InitialContextFactory.java
 Tue Apr  6 00:23:16 2010
@@ -41,16 +41,27 @@ public class InitialContextFactory {
 
 private static final Logger log = LoggingManager.getLoggerForClass();
 
-public static synchronized Context lookupContext(String jndi, String url, 
boolean useAuth, String user, String pwd) {
-Context ctx = MAP.get(jndi + url);
+/**
+ * Look up the context from the local cache, creating it if necessary.
+ * 
+ * @param initialContextFactory used to set the property {...@link 
Context#INITIAL_CONTEXT_FACTORY}
+ * @param providerUrl used to set the property {...@link 
Context#PROVIDER_URL}
+ * @param useAuth set true if security is to be used.
+ * @param securityPrincipal used to set the property {...@link 
Context#SECURITY_PRINCIPAL}
+ * @param securityCredentials used to set the property {...@link 
Context#SECURITY_CREDENTIALS}
+ * @return the context, may be null
+ */
+public static synchronized Context lookupContext(String 
initialContextFactory, 
+String providerUrl, boolean useAuth, String securityPrincipal, 
String securityCredentials) {
+Context ctx = MAP.get(initialContextFactory + providerUrl);
 if (ctx == null) {
 Properties props = new Properties();
-props.setProperty(Context.INITIAL_CONTEXT_FACTORY, jndi);
-props.setProperty(Context.PROVIDER_URL, url);
-if (useAuth  user != null  pwd != null
- user.length()  0  pwd.length()  0) {
-props.setProperty(Context.SECURITY_PRINCIPAL, user);
-props.setProperty(Context.SECURITY_CREDENTIALS, pwd);
+props.setProperty(Context.INITIAL_CONTEXT_FACTORY, 
initialContextFactory);
+props.setProperty(Context.PROVIDER_URL, providerUrl);
+if (useAuth  securityPrincipal != null  securityCredentials != 
null
+ securityPrincipal.length()  0  
securityCredentials.length()  0) {
+props.setProperty(Context.SECURITY_PRINCIPAL, 
securityPrincipal);
+props.setProperty(Context.SECURITY_CREDENTIALS, 
securityCredentials);
 log.info(authentication properties set);
 }
 try {
@@ -60,7 +71,7 @@ public class InitialContextFactory {
 log.error(lookupContext::  + e.getMessage());
 }
 if (ctx != null) {
-MAP.put(jndi + url, ctx);
+MAP.put(initialContextFactory + providerUrl, ctx);
 }
 }
 return ctx;
@@ -73,7 +84,9 @@ public class InitialContextFactory {
  * @param name
  * @return the topic or null
  */
-public static synchronized Topic lookupTopic(Context ctx, String name) {
+// TODO this method probably belongs in a separate utility class.
+// Also, why allow null input? Better to throw NPE or IAE
+public static Topic lookupTopic(Context ctx, String name) {
 Topic t = null;
 if (name != null  ctx != null) {
 try {



-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



svn commit: r930993 - /jakarta/jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/client/InitialContextFactory.java

2010-04-05 Thread sebb
Author: sebb
Date: Tue Apr  6 01:07:29 2010
New Revision: 930993

URL: http://svn.apache.org/viewvc?rev=930993view=rev
Log:
Clarify log message

Modified:

jakarta/jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/client/InitialContextFactory.java

Modified: 
jakarta/jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/client/InitialContextFactory.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/client/InitialContextFactory.java?rev=930993r1=930992r2=930993view=diff
==
--- 
jakarta/jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/client/InitialContextFactory.java
 (original)
+++ 
jakarta/jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/client/InitialContextFactory.java
 Tue Apr  6 01:07:29 2010
@@ -66,7 +66,7 @@ public class InitialContextFactory {
 }
 try {
 ctx = new InitialContext(props);
-log.info(created the JNDI initial context factory);
+log.info(created the JNDI initial context for the factory);
 } catch (NamingException e) {
 log.error(lookupContext::  + e.getMessage());
 }



-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



svn commit: r930994 - /jakarta/jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/client/ConnectionFactory.java

2010-04-05 Thread sebb
Author: sebb
Date: Tue Apr  6 01:44:08 2010
New Revision: 930994

URL: http://svn.apache.org/viewvc?rev=930994view=rev
Log:
Javadoc; general tidyup

Modified:

jakarta/jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/client/ConnectionFactory.java

Modified: 
jakarta/jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/client/ConnectionFactory.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/client/ConnectionFactory.java?rev=930994r1=930993r2=930994view=diff
==
--- 
jakarta/jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/client/ConnectionFactory.java
 (original)
+++ 
jakarta/jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/client/ConnectionFactory.java
 Tue Apr  6 01:44:08 2010
@@ -98,19 +98,29 @@ public class ConnectionFactory implement
 public void testIterationStart(LoopIterationEvent event) {
 }
 
-public static synchronized TopicConnectionFactory 
getTopicConnectionFactory(Context ctx, String fac) {
+/**
+ * Get the cached TopicConnectionFactory.
+ * 
+ * @param ctx the context to use
+ * @param factoryName the name of the factory
+ * @return the factory, or null if it could not be found
+ */
+public static synchronized TopicConnectionFactory 
getTopicConnectionFactory(Context ctx, String factoryName) {
 int counter = MAX_RETRY;
 while (factory == null  counter  0) {
  try {
- Object objfac = ctx.lookup(fac);
+ Object objfac = ctx.lookup(factoryName);
  if (objfac instanceof TopicConnectionFactory) {
  factory = (TopicConnectionFactory) objfac;
+ } else {
+ log.error(Expected TopicConnectionFactory, found 
+objfac.getClass().getName());
+ break;
  }
  } catch (NamingException e) {
 if (counter == MAX_RETRY) {
-log.error(Unable to find connection factory  + fac + , 
will retry. Error:  + e.toString());
+log.error(Unable to find topic connection factory  + 
factoryName + , will retry. Error:  + e.toString());
 } else if (counter == 1) {
-log.error(Unable to find connection factory  + fac + , 
giving up. Error:  + e.toString());
+log.error(Unable to find topic connection factory  + 
factoryName + , giving up. Error:  + e.toString());
 }
 counter--;
 try {
@@ -123,19 +133,29 @@ public class ConnectionFactory implement
  return factory;
 }
 
-public static synchronized QueueConnectionFactory 
getQueueConnectionFactory(Context ctx, String fac) {
+/**
+ * Get the cached QueueConnectionFactory.
+ * 
+ * @param ctx the context to use
+ * @param factoryName the queue factory name
+ * @return the factory, or null if the factory could not be found
+ */
+public static synchronized QueueConnectionFactory 
getQueueConnectionFactory(Context ctx, String factoryName) {
 int counter = MAX_RETRY;
 while (qfactory == null  counter  0) {
  try {
- Object objfac = ctx.lookup(fac);
+ Object objfac = ctx.lookup(factoryName);
  if (objfac instanceof QueueConnectionFactory) {
  qfactory = (QueueConnectionFactory) objfac;
+ } else {
+ log.error(Expected QueueConnectionFactory, found 
+objfac.getClass().getName());
+ break;
  }
  } catch (NamingException e) {
 if (counter == MAX_RETRY) {
-log.error(Unable to find connection factory  + fac + , 
will retry. Error:  + e.toString());
+log.error(Unable to find queue connection factory  + 
factoryName + , will retry. Error:  + e.toString());
 } else if (counter == 1) {
-log.error(Unable to find connection factory  + fac + , 
giving up. Error:  + e.toString());
+log.error(Unable to find queue connection factory  + 
factoryName + , giving up. Error:  + e.toString());
 }
 counter--;
 try {



-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



svn commit: r930995 - /jakarta/jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/client/Publisher.java

2010-04-05 Thread sebb
Author: sebb
Date: Tue Apr  6 01:44:54 2010
New Revision: 930995

URL: http://svn.apache.org/viewvc?rev=930995view=rev
Log:
Prevent NPEs
General tidyup

Modified:

jakarta/jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/client/Publisher.java

Modified: 
jakarta/jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/client/Publisher.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/client/Publisher.java?rev=930995r1=930994r2=930995view=diff
==
--- 
jakarta/jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/client/Publisher.java
 (original)
+++ 
jakarta/jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/client/Publisher.java
 Tue Apr  6 01:44:54 2010
@@ -37,25 +37,31 @@ public class Publisher {
 
 private static final Logger log = LoggingManager.getLoggerForClass();
 
-private TopicConnection CONN = null;
+private TopicConnection connection = null;
 
-private TopicSession SESSION = null;
+private TopicSession session = null;
 
-private Topic TOPIC = null;
+private Topic topic = null;
 
-private TopicPublisher PUBLISHER = null;
-
-//private byte[] RESULT = null;
-
-//private Object OBJ_RESULT = null;
+private TopicPublisher publisher = null;
 
 /**
- *
+ * Create a publisher using either the jndi.properties file or the 
provided parameters
+ * @param useProps true if a jndi.properties file is to be used
+ * @param initialContextFactory the (ignored if useProps is true)
+ * @param providerUrl (ignored if useProps is true)
+ * @param connfactory
+ * @param topic
+ * @param useAuth (ignored if useProps is true)
+ * @param securityPrincipal (ignored if useProps is true)
+ * @param securityCredentials (ignored if useProps is true)
  */
-public Publisher(boolean useProps, String jndi, String url, String 
connfactory, String topic, boolean useAuth,
-String user, String pwd) {
+public Publisher(boolean useProps, String initialContextFactory, String 
providerUrl, 
+String connfactory, String topic, boolean useAuth,
+String securityPrincipal, String securityCredentials) {
 super();
-Context ctx = initJNDI(useProps, jndi, url, useAuth, user, pwd);
+Context ctx = initJNDI(useProps, initialContextFactory, 
+providerUrl, useAuth, securityPrincipal, securityCredentials);
 if (ctx != null) {
 initConnection(ctx, connfactory, topic);
 } else {
@@ -63,7 +69,8 @@ public class Publisher {
 }
 }
 
-private Context initJNDI(boolean useProps, String jndi, String url, 
boolean useAuth, String user, String pwd) {
+private Context initJNDI(boolean useProps, String initialContextFactory, 
+String providerUrl, boolean useAuth, String securityPrincipal, 
String securityCredentials) {
 if (useProps) {
 try {
 return new InitialContext();
@@ -72,17 +79,18 @@ public class Publisher {
 return null;
 }
 } else {
-return InitialContextFactory.lookupContext(jndi, url, useAuth, 
user, pwd);
+return InitialContextFactory.lookupContext(initialContextFactory, 
+providerUrl, useAuth, securityPrincipal, 
securityCredentials);
 }
 }
 
-private void initConnection(Context ctx, String connfactory, String topic) 
{
+private void initConnection(Context ctx, String connfactory, String 
topicName) {
 try {
 ConnectionFactory.getTopicConnectionFactory(ctx,connfactory);
-this.CONN = ConnectionFactory.getTopicConnection();
-this.TOPIC = InitialContextFactory.lookupTopic(ctx, topic);
-this.SESSION = this.CONN.createTopicSession(false, 
TopicSession.AUTO_ACKNOWLEDGE);
-this.PUBLISHER = this.SESSION.createPublisher(this.TOPIC);
+connection = ConnectionFactory.getTopicConnection();
+topic = InitialContextFactory.lookupTopic(ctx, topicName);
+session = connection.createTopicSession(false, 
TopicSession.AUTO_ACKNOWLEDGE);
+publisher = session.createPublisher(topic);
 log.info(created the topic connection successfully);
 } catch (JMSException e) {
 log.error(Connection error:  + e.getMessage());
@@ -91,8 +99,8 @@ public class Publisher {
 
 public void publish(String text) {
 try {
-TextMessage msg = this.SESSION.createTextMessage(text);
-this.PUBLISHER.publish(msg);
+TextMessage msg = session.createTextMessage(text);
+publisher.publish(msg);
 } catch (JMSException e) {
 log.error(e.getMessage());
 }
@@ -100,25 +108,31 @@ public class Publisher {
 
 public void publish(Serializable contents

svn commit: r930998 - in /jakarta/jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms: client/Publisher.java sampler/PublisherSampler.java

2010-04-05 Thread sebb
Author: sebb
Date: Tue Apr  6 02:06:16 2010
New Revision: 930998

URL: http://svn.apache.org/viewvc?rev=930998view=rev
Log:
Basic check to ensure that Publisher failures are better reported in test 
results

Modified:

jakarta/jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/client/Publisher.java

jakarta/jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/PublisherSampler.java

Modified: 
jakarta/jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/client/Publisher.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/client/Publisher.java?rev=930998r1=930997r2=930998view=diff
==
--- 
jakarta/jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/client/Publisher.java
 (original)
+++ 
jakarta/jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/client/Publisher.java
 Tue Apr  6 02:06:16 2010
@@ -45,6 +45,8 @@ public class Publisher {
 
 private TopicPublisher publisher = null;
 
+public final boolean isValid;
+
 /**
  * Create a publisher using either the jndi.properties file or the 
provided parameters
  * @param useProps true if a jndi.properties file is to be used
@@ -56,6 +58,8 @@ public class Publisher {
  * @param securityPrincipal (ignored if useProps is true)
  * @param securityCredentials (ignored if useProps is true)
  */
+// TODO - does it make sense to return a Publisher that has not been 
created successfully?
+// Might be simpler just to return JMSException
 public Publisher(boolean useProps, String initialContextFactory, String 
providerUrl, 
 String connfactory, String topic, boolean useAuth,
 String securityPrincipal, String securityCredentials) {
@@ -67,6 +71,7 @@ public class Publisher {
 } else {
 log.error(Could not initialize JNDI Initial Context Factory);
 }
+isValid = publisher != null; // This is the last item set up by 
initConnection
 }
 
 private Context initJNDI(boolean useProps, String initialContextFactory, 

Modified: 
jakarta/jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/PublisherSampler.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/PublisherSampler.java?rev=930998r1=930997r2=930998view=diff
==
--- 
jakarta/jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/PublisherSampler.java
 (original)
+++ 
jakarta/jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/PublisherSampler.java
 Tue Apr  6 02:06:16 2010
@@ -128,12 +128,15 @@ public class PublisherSampler extends Ba
 public SampleResult sample() {
 SampleResult result = new SampleResult();
 result.setSampleLabel(getName());
+result.setSuccessful(false); // Assume it will fail
+result.setResponseCode(000); // ditto $NON-NLS-1$
+result.setResponseMessage(See log file for details); // ditto
 if (publisher == null) {
 initClient();
 }
 StringBuilder buffer = new StringBuilder();
 int loop = getIterationCount();
-if (publisher != null) {
+if (publisher != null  publisher.isValid) {
 result.sampleStart();
 for (int idx = 0; idx  loop; idx++) {
 String tmsg = getMessageContent();



-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



svn commit: r929364 - in /jakarta/jmeter/trunk: src/core/org/apache/jmeter/samplers/SampleResult.java src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSampleResult.java xdocs/changes.xml

2010-03-30 Thread sebb
Author: sebb
Date: Wed Mar 31 02:24:29 2010
New Revision: 929364

URL: http://svn.apache.org/viewvc?rev=929364view=rev
Log:
Bug 43678 - Handle META tag http-equiv charset?

Modified:
jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleResult.java

jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSampleResult.java
jakarta/jmeter/trunk/xdocs/changes.xml

Modified: 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleResult.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleResult.java?rev=929364r1=929363r2=929364view=diff
==
--- jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleResult.java 
(original)
+++ jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleResult.java 
Wed Mar 31 02:24:29 2010
@@ -691,14 +691,25 @@ public class SampleResult implements Ser
 }
 
 /**
- * Returns the dataEncoding or the default if no dataEncoding was provided
+ * Returns the dataEncoding or the default if no dataEncoding was provided.
+ * 
  * @return the value of the dataEncoding or DEFAULT_ENCODING
  */
 public String getDataEncodingWithDefault() {
+return getDataEncodingWithDefault(DEFAULT_ENCODING);
+}
+
+/**
+ * Returns the dataEncoding or the default if no dataEncoding was provided.
+ * 
+ * @param defaultEncoding the default to be applied
+ * @return the value of the dataEncoding or the provided default
+ */
+protected String getDataEncodingWithDefault(String defaultEncoding) {
 if (dataEncoding != null  dataEncoding.length()  0) {
 return dataEncoding;
 }
-return DEFAULT_ENCODING;
+return defaultEncoding;
 }
 
 /**

Modified: 
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSampleResult.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSampleResult.java?rev=929364r1=929363r2=929364view=diff
==
--- 
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSampleResult.java
 (original)
+++ 
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSampleResult.java
 Wed Mar 31 02:24:29 2010
@@ -51,7 +51,6 @@ public class HTTPSampleResult extends Sa
 
 public HTTPSampleResult() {
 super();
-setDataEncoding(DEFAULT_HTTP_ENCODING); // default if encoding not 
provided be the page
 }
 
 public HTTPSampleResult(long elapsed) {
@@ -207,7 +206,7 @@ public class HTTPSampleResult extends Sa
 }
 }
 }
-return super.getDataEncodingWithDefault();
+return super.getDataEncodingWithDefault(DEFAULT_HTTP_ENCODING);
 }
 
 public void setResponseNoContent(){

Modified: jakarta/jmeter/trunk/xdocs/changes.xml
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/xdocs/changes.xml?rev=929364r1=929363r2=929364view=diff
==
--- jakarta/jmeter/trunk/xdocs/changes.xml (original)
+++ jakarta/jmeter/trunk/xdocs/changes.xml Wed Mar 31 02:24:29 2010
@@ -85,6 +85,7 @@ The XPath Assertion and XPath Extractor 
 liBug 48568 - CookieManager broken for AjpSampler/li
 liBug 48570 - AjpSampler doesn't support query parameters (GET/POST)/li
 liBug 46901 - HTTP Sampler does not process var/func refs correctly in first 
file parameter/li
+liBug 43678 - Handle META tag http-equiv charset?/li
 /ul
 
 h3Other Samplers/h3



-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



Re: Getting Exception when i am trying to record an HTTPS application

2010-03-17 Thread sebb
On 17/03/2010, Rajesh Tiwary rajesh...@tcs.com wrote:

  hi,
  following is the order in which my test plan has been arranged..

  -Thread Group
- HTTP Header Manager
 -HTTP Cookie Manager
 -HTTP Request Defaults

-Simple Controller(main page)  { only page load operation is recorded
  here}
 -tree listener   {response shows main page loaded successfully}

   -Simple Controller(login page)  {login form load,user id and password is
  entered}
   -tree listener {response shows login page }

Clearly the login has not succeeded, there must be something missing
or wrong with the request. Maybe there are some dynamic variables that
need to be set.

Run the recording again, and compare the new login request with the old request.

   -Simple Controller( confirmation page) { button click to enter detail in
  the confirmation page and submit form data is recorded here}
   -tree listener { response shows that session expired}

   -Simple Controller(search page){here name is entered to search the detail
  entered is recorded}
   -tree listener { response shows that session expired}

  I hope you get a brief idea about my test plan..
   please reply ur suggesstion




  raghavendra kumar wrote:
  
   send me u r jmx file so that i can say where we are doing wrong
  
   On Wed, Mar 17, 2010 at 11:57 AM, Rajesh Tiwary rajesh...@tcs.com wrote:
  
  
   Hi Raghavendra,
  
   ya that problem solved..when i am using jre 1.5 then i am not getting
   exception and i am able to record the pages..
  
   but theres another issue..as i am running the test plan for the following
   step..
  
   Main page login confirmation pageadd details--search
   details..
  
   then i have added tree listener so in the response page of tree listener
   for
   login..i am getting the same login page as the response..
   and for further process like confirmation--add detail..all other tree
   listener have the response as kindly re-login as ur session has been
   expired..
   i have added http cookie manager and http url rewriting..
  
  
   Rajesh Tiwary wrote:
   
Hi,
   
Ya this is the exception...
   
   
javax.net.ssl.SSLHandshakeException: Remote host closed connection
   during
handshake
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocke tImpl.java:828)
at sun.security.ssl.SSLSocketImpl.performInitialHands
hake(SSLSocketImpl.java:1116)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLS
   ocketImpl.java:1143)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLS
   ocketImpl.java:1127)
at sun.net.http://www.protocol.https.HttpsClien...lient.java:423)
at sun.net.http://www.protocol.https.AbstractDe...ction.java:185)
at sun.net.http://www.protocol.https.HttpsURLCo...nImpl.java:153)
at org.apache.jmeter.protocol.http.sampler.HTTPSample
r.sample(HTTPSampler.java:490)
at org.apache.jmeter.protocol.http.sampler.HTTPSample
rBase.sample(HTTPSamplerBase.java:1037)
at org.apache.jmeter.protocol.http.proxy.Proxy.run(Pr oxy.java:195)
Caused by: java.io.EOFException: SSL peer shut down incorrectly
at sun.security.ssl.InputRecord.read(InputRecord.java :352)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocke tImpl.java:809)
... 9 more
   
 i am getting this in my mozilla browser window during the instance
   when
   i
am trying to record the login page using JMeter..
i am using fedora as my OS..
   
which script ur asking for..i mean the .jmx file for the test or
   something
else..
   
what can be the problem...have u faced this problem earlier?
   
what changes we have to do in jmeter.properties file?
   
   
   
raghavendra kumar wrote:
   
hi,
   
Can u send me the Stack trace of the exception or the script
   
   
   
   
On Tue, Mar 16, 2010 at 7:35 PM, Rajesh Tiwary rajesh...@tcs.com
   wrote:
   
   
Hi,
No i am facing the same problem..theres no improvement..same old
exception..i am using jre 1.6
someone said that using jre 1.5 may help..
   
can you suggest anything else..i am able to record the 1st page or
   index
page of https web application..but not able to record the login page
   or
any
other page..
   
Please reply..
   
regards,
rajesh
   
   
   
Rajesh Tiwary wrote:

 Hi raghavendra,
 thanks yaar..thanks for d reply..

 so after downloading the given version..rest other procedures are
   same
 like to record first then apply assertion and test or any other
process
 needs to be followed??
 I will be posting another issues if i face any..


 raghavendra kumar wrote:

 http://www.milamberspace.net/jmeter-testing/dist/

 http://www.milamberspace.net/jmeter-testing/dist/this is the
   link
from
 where u can get the jmeter batch file

 On Tue, Mar 16, 2010 at 6:20 PM, Rajesh Tiwary rajesh...@tcs.com
wrote:


 Hi raghavendra..

  

svn commit: r923374 - in /jakarta/jmeter/trunk: src/components/org/apache/jmeter/timers/SyncTimer.java xdocs/changes.xml

2010-03-15 Thread sebb
Author: sebb
Date: Mon Mar 15 18:22:06 2010
New Revision: 923374

URL: http://svn.apache.org/viewvc?rev=923374view=rev
Log:
Bug 48901 - Endless wait by adding Synchronizing Timer

Modified:
jakarta/jmeter/trunk/src/components/org/apache/jmeter/timers/SyncTimer.java
jakarta/jmeter/trunk/xdocs/changes.xml

Modified: 
jakarta/jmeter/trunk/src/components/org/apache/jmeter/timers/SyncTimer.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/components/org/apache/jmeter/timers/SyncTimer.java?rev=923374r1=923373r2=923374view=diff
==
--- jakarta/jmeter/trunk/src/components/org/apache/jmeter/timers/SyncTimer.java 
(original)
+++ jakarta/jmeter/trunk/src/components/org/apache/jmeter/timers/SyncTimer.java 
Mon Mar 15 18:22:06 2010
@@ -86,7 +86,6 @@ public class SyncTimer extends AbstractT
 log.warn(e.getLocalizedMessage());
 }
 }
-timerCounter[0]=0; // Reset for next time
 }
 return 0;
 }

Modified: jakarta/jmeter/trunk/xdocs/changes.xml
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/xdocs/changes.xml?rev=923374r1=923373r2=923374view=diff
==
--- jakarta/jmeter/trunk/xdocs/changes.xml (original)
+++ jakarta/jmeter/trunk/xdocs/changes.xml Mon Mar 15 18:22:06 2010
@@ -133,6 +133,7 @@ The XPath Assertion and XPath Extractor 
 liDisallow adding any child elements to JDBC Configuration/li
 liBeanInfoSupport now caches getBeanDescriptor() - should avoid an NPE on 
non-Sun JVMs when using CSVDataSet (and some other TestBeans)/li
 liBug 48350 - Deadlock on distributed testing with 2 clients/li
+liBug 48901 - Endless wait by adding Synchronizing Timer/li
 /ul
 
 !--  --



-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



svn commit: r922843 - /jakarta/jmeter/trunk/build.xml

2010-03-14 Thread sebb
Author: sebb
Date: Sun Mar 14 13:41:26 2010
New Revision: 922843

URL: http://svn.apache.org/viewvc?rev=922843view=rev
Log:
Run 3rdparty check later, so still works if called after download_jars

Modified:
jakarta/jmeter/trunk/build.xml

Modified: jakarta/jmeter/trunk/build.xml
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/build.xml?rev=922843r1=922842r2=922843view=diff
==
--- jakarta/jmeter/trunk/build.xml (original)
+++ jakarta/jmeter/trunk/build.xml Sun Mar 14 13:41:26 2010
@@ -941,16 +941,18 @@ run JMeter unless all the JMeter jars ar
   /target
 
   !-- Check that the 3rd party libraries are present --
-  condition property=3rdparty.present
-and
-!-- No need to check all jars; just check a few --
-available classpathref=classpath 
classname=org.apache.bsf.BSFEngine/
-available classpathref=classpath classname=org.htmlparser.Parser/
-available classpathref=classpath 
classname=com.thoughtworks.xstream.XStream/
-/and
-  /condition
+  target name=_check_3rdparty
+condition property=3rdparty.present
+  and
+  !-- No need to check all jars; just check a few --
+  available classpathref=classpath 
classname=org.apache.bsf.BSFEngine/
+  available classpathref=classpath 
classname=org.htmlparser.Parser/
+  available classpathref=classpath 
classname=com.thoughtworks.xstream.XStream/
+  /and
+/condition
+  /target
 
-  target name=_message_3rdParty unless=3rdparty.present
+  target name=_message_3rdParty depends=_check_3rdparty 
unless=3rdparty.present
 echoCannot find all the required 3rd party libraries./echo
 echoIf building from a release, you can get most of them from the binary 
archive./echo
 echoUse ant download_jars to download any missing jars./echo
@@ -1290,7 +1292,7 @@ run JMeter unless all the JMeter jars ar
   depends=_gump_properties,clean,install 
   description=Build JMeter
 property name=dist.name value=jakarta-jmeter-${jmeter.version}/
-   available file=${velocity.jar} property=3rdparty.present/
+   available file=${velocity.jar} property=velocity.present/
 !-- No need to create the archives for Gump
 antcall target=_pack-binaries/
 antcall target=_pack-libraries/
@@ -1525,6 +1527,7 @@ run JMeter unless all the JMeter jars ar
   overview=${src.docs}/overview.html
   additionalparam=-breakiterator 
   destdir=${dest.docs.api} 
+  verbose=false
   protected=yes 
   version=yes 
   doctitle=Apache JMeter API 
@@ -2040,7 +2043,7 @@ run JMeter unless all the JMeter jars ar
 /target
 
!-- Download jars only needed by Gump (unless already done) --
-target name=_process_gump_jars unless=3rdparty.present
+target name=_process_gump_jars unless=velocity.present
 process_jarfile jarname=excalibur-datasource/
 process_jarfile jarname=excalibur-instrument/
 process_jarfile jarname=excalibur-logger/



-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



svn commit: r922862 - /jakarta/jmeter/trunk/src/junit/org/apache/jmeter/protocol/java/control/gui/JUnitTestSamplerGui.java

2010-03-14 Thread sebb
Author: sebb
Date: Sun Mar 14 14:22:40 2010
New Revision: 922862

URL: http://svn.apache.org/viewvc?rev=922862view=rev
Log:
Javadoc fixes

Modified:

jakarta/jmeter/trunk/src/junit/org/apache/jmeter/protocol/java/control/gui/JUnitTestSamplerGui.java

Modified: 
jakarta/jmeter/trunk/src/junit/org/apache/jmeter/protocol/java/control/gui/JUnitTestSamplerGui.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/junit/org/apache/jmeter/protocol/java/control/gui/JUnitTestSamplerGui.java?rev=922862r1=922861r2=922862view=diff
==
--- 
jakarta/jmeter/trunk/src/junit/org/apache/jmeter/protocol/java/control/gui/JUnitTestSamplerGui.java
 (original)
+++ 
jakarta/jmeter/trunk/src/junit/org/apache/jmeter/protocol/java/control/gui/JUnitTestSamplerGui.java
 Sun Mar 14 14:22:40 2010
@@ -252,14 +252,14 @@ implements ChangeListener, ActionListene
 
errorCode.setText(JMeterUtils.getResString(junit_error_default_code)); 
//$NON-NLS-1$
 }
 
-/** @{inheritDoc} */
+/** {...@inheritdoc} */
 @Override
 public void clearGui() {
 super.clearGui();
 initGui();
 }
 
-/** @{inheritDoc} */
+/** {...@inheritdoc} */
 public TestElement createTestElement()
 {
 JUnitSampler sampler = new JUnitSampler();
@@ -267,7 +267,7 @@ implements ChangeListener, ActionListene
 return sampler;
 }
 
-/** @{inheritDoc} */
+/** {...@inheritdoc} */
 public void modifyTestElement(TestElement el)
 {
 JUnitSampler sampler = (JUnitSampler)el;
@@ -298,7 +298,7 @@ implements ChangeListener, ActionListene
 sampler.setJunit4(junit4.isSelected());
 }
 
-/** @{inheritDoc} */
+/** {...@inheritdoc} */
 @Override
 public void configure(TestElement el)
 {



-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



svn commit: r922204 - in /jakarta/jmeter/trunk: bin/jmeter.properties src/core/org/apache/jmeter/samplers/StatisticalSampleResult.java src/core/org/apache/jmeter/samplers/StatisticalSampleSender.java

2010-03-12 Thread sebb
Author: sebb
Date: Fri Mar 12 10:44:48 2010
New Revision: 922204

URL: http://svn.apache.org/viewvc?rev=922204view=rev
Log:
Revert to previous behaviour, i.e. key on thread Group, but allow this to be 
changed by defining key_on_threadname=true

Modified:
jakarta/jmeter/trunk/bin/jmeter.properties

jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/StatisticalSampleResult.java

jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/StatisticalSampleSender.java

Modified: jakarta/jmeter/trunk/bin/jmeter.properties
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/bin/jmeter.properties?rev=922204r1=922203r2=922204view=diff
==
--- jakarta/jmeter/trunk/bin/jmeter.properties (original)
+++ jakarta/jmeter/trunk/bin/jmeter.properties Fri Mar 12 10:44:48 2010
@@ -474,6 +474,8 @@ wmlParser.types=text/vnd.wap.wml 
 #mode=Batch
 #mode=Hold
 #mode=Statistical
+#Set to true to key statistical samples on threadName rather than threadGroup
+#key_on_threadname=false
 #mode=Stripped
 #mode=StrippedBatch
 #mode=org.example.load.MySampleSender

Modified: 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/StatisticalSampleResult.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/StatisticalSampleResult.java?rev=922204r1=922203r2=922204view=diff
==
--- 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/StatisticalSampleResult.java
 (original)
+++ 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/StatisticalSampleResult.java
 Fri Mar 12 10:44:48 2010
@@ -51,10 +51,19 @@ public class StatisticalSampleResult ext
 super(stamp, elapsed);
 }
 
-public StatisticalSampleResult(SampleResult res) {
+/**
+ * Create a statistical sample result from an ordinary sample result.
+ * 
+ * @param res the sample result 
+ * @param keyOnThreadName true if key includes threadName, false if 
threadGroup
+ */
+public StatisticalSampleResult(SampleResult res, boolean keyOnThreadName) {
 // Copy data that is shared between samples (i.e. the key items):
 setSampleLabel(res.getSampleLabel());
-setThreadName(res.getThreadName());
+
+if (keyOnThreadName) {
+setThreadName(res.getThreadName());
+}
 
 setSuccessful(true); // Assume result is OK
 setSampleCount(0); // because we add the sample count in later
@@ -108,17 +117,22 @@ public class StatisticalSampleResult ext
 
 /**
  * Generates the key to be used for aggregating samples as follows:br/
- * codesampleLabel/code - codethreadName/code
- *
+ * codesampleLabel/code - code[threadName|threadGroup]/code
+ * p
  * N.B. the key should agree with the fixed items that are saved in the 
sample.
  *
  * @param event sample event whose key is to be calculated
+ * @param keyOnThreadName true if key should use thread name, otherwise 
use thread group
  * @return the key to use for aggregating samples
  */
-public static String getKey(SampleEvent event) {
+public static String getKey(SampleEvent event, boolean keyOnThreadName) {
 StringBuilder sb = new StringBuilder(80);
 sb.append(event.getResult().getSampleLabel());
-sb.append('-').append(event.getResult().getThreadName());
+if (keyOnThreadName){
+sb.append('-').append(event.getResult().getThreadName());
+} else {
+sb.append('-').append(event.getThreadGroup());
+}
 return sb.toString();
 }
 }

Modified: 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/StatisticalSampleSender.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/StatisticalSampleSender.java?rev=922204r1=922203r2=922204view=diff
==
--- 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/StatisticalSampleSender.java
 (original)
+++ 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/StatisticalSampleSender.java
 Fri Mar 12 10:44:48 2010
@@ -48,6 +48,9 @@ public class StatisticalSampleSender imp
 private static final long TIME_THRESHOLD_MS = 
JMeterUtils.getPropDefault(time_threshold,
 DEFAULT_TIME_THRESHOLD);
 
+// should the samples be aggregated on thread name or thread group 
(default) ?
+private static boolean KEY_ON_THREADNAME = 
JMeterUtils.getPropDefault(key_on_threadname, false);
+
 private final RemoteSampleListener listener;
 
 private final ListSampleEvent sampleStore = new ArrayListSampleEvent();
@@ -75,8 +78,9 @@ public class StatisticalSampleSender imp
  */
 StatisticalSampleSender(RemoteSampleListener listener) {
 this.listener = listener;
-log.info(Using batching for this run. +  Thresholds

Re: jmx export for webscaran with HTTPS

2010-03-12 Thread sebb
On 12/03/2010, Miklos Tverdota tverd...@gmx.de wrote:




 Hi,



 It is a hard work to send an attachment to this list.


Please don't send attachments to the JMeter mailing lists.

Patches should be attached to a Bugzilla enhancement request.


 Please let me know if you got it. And it works.



 Regards,



 Miklos





 -
  To unsubscribe, e-mail:
 jmeter-dev-unsubscr...@jakarta.apache.org
  For additional commands, e-mail:
 jmeter-dev-h...@jakarta.apache.org


-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



svn commit: r921758 - in /jakarta/jmeter/trunk/src/core/org/apache/jmeter: images/icon.properties threads/gui/AbstractThreadGroupGui.java

2010-03-11 Thread sebb
Author: sebb
Date: Thu Mar 11 09:43:08 2010
New Revision: 921758

URL: http://svn.apache.org/viewvc?rev=921758view=rev
Log:
Bug 48883 - Corrections for AbstractThreadGroup

Modified:
jakarta/jmeter/trunk/src/core/org/apache/jmeter/images/icon.properties

jakarta/jmeter/trunk/src/core/org/apache/jmeter/threads/gui/AbstractThreadGroupGui.java

Modified: jakarta/jmeter/trunk/src/core/org/apache/jmeter/images/icon.properties
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/images/icon.properties?rev=921758r1=921757r2=921758view=diff
==
--- jakarta/jmeter/trunk/src/core/org/apache/jmeter/images/icon.properties 
(original)
+++ jakarta/jmeter/trunk/src/core/org/apache/jmeter/images/icon.properties Thu 
Mar 11 09:43:08 2010
@@ -18,7 +18,7 @@
 # Value:   icon, optionally followed by space and then the disabled icon 
name
 org.apache.jmeter.control.gui.TestPlanGui=org/apache/jmeter/images/beaker.gif
 
org.apache.jmeter.timers.gui.AbstractTimerGui=org/apache/jmeter/images/timer.gif
-org.apache.jmeter.threads.gui.ThreadGroupGui=org/apache/jmeter/images/thread.gif
+org.apache.jmeter.threads.gui.AbstractThreadGroupGui=org/apache/jmeter/images/thread.gif
 
org.apache.jmeter.visualizers.gui.AbstractListenerGui=org/apache/jmeter/images/meter.png
 
org.apache.jmeter.config.gui.AbstractConfigGui=org/apache/jmeter/images/testtubes.png
 
org.apache.jmeter.processor.gui.AbstractPreProcessorGui=org/apache/jmeter/images/leafnode.gif

Modified: 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/threads/gui/AbstractThreadGroupGui.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/threads/gui/AbstractThreadGroupGui.java?rev=921758r1=921757r2=921758view=diff
==
--- 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/threads/gui/AbstractThreadGroupGui.java
 (original)
+++ 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/threads/gui/AbstractThreadGroupGui.java
 Thu Mar 11 09:43:08 2010
@@ -20,7 +20,6 @@ package org.apache.jmeter.threads.gui;
 
 import java.awt.BorderLayout;
 import java.awt.Dimension;
-import java.awt.event.ItemListener;
 import java.util.Arrays;
 import java.util.Collection;
 import javax.swing.BorderFactory;
@@ -39,7 +38,7 @@ import org.apache.jmeter.testelement.pro
 import org.apache.jmeter.threads.AbstractThreadGroup;
 import org.apache.jmeter.util.JMeterUtils;
 
-public abstract class AbstractThreadGroupGui extends 
AbstractJMeterGuiComponent implements ItemListener {
+public abstract class AbstractThreadGroupGui extends 
AbstractJMeterGuiComponent {
 private static final long serialVersionUID = 240L;
 
 // Sampler error action buttons



-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



svn commit: r921796 - in /jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers: BatchSampleSender.java StatisticalSampleSender.java

2010-03-11 Thread sebb
Author: sebb
Date: Thu Mar 11 10:52:18 2010
New Revision: 921796

URL: http://svn.apache.org/viewvc?rev=921796view=rev
Log:
Might as well be static variables

Modified:

jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/BatchSampleSender.java

jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/StatisticalSampleSender.java

Modified: 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/BatchSampleSender.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/BatchSampleSender.java?rev=921796r1=921795r2=921796view=diff
==
--- 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/BatchSampleSender.java 
(original)
+++ 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/BatchSampleSender.java 
Thu Mar 11 10:52:18 2010
@@ -47,7 +47,7 @@ public class BatchSampleSender implement
 private final int numSamplesThreshold = 
 JMeterUtils.getPropDefault(num_sample_threshold, 
DEFAULT_NUM_SAMPLE_THRESHOLD); // $NON-NLS-1$
 
-private final long timeThreshold =
+private static final long TIME_THRESHOLD_MS =
 JMeterUtils.getPropDefault(time_threshold, DEFAULT_TIME_THRESHOLD); 
// $NON-NLS-1$
 
 private long batchSendTime = -1;
@@ -70,7 +70,7 @@ public class BatchSampleSender implement
 this.listener = listener;
 log.info(Using batching for this run.
 +  Thresholds: num= + numSamplesThreshold
-+ , time= + timeThreshold);
++ , time= + TIME_THRESHOLD_MS);
 }
 
 /**
@@ -134,13 +134,13 @@ public class BatchSampleSender implement
 }
 }
 
-if (timeThreshold != -1) {
+if (TIME_THRESHOLD_MS != -1) {
 SampleResult sr = e.getResult();
 long timestamp = sr.getTimeStamp();
 
 // Checking for and creating initial timestamp to cheak against
 if (batchSendTime == -1) {
-this.batchSendTime = timestamp + timeThreshold;
+this.batchSendTime = timestamp + TIME_THRESHOLD_MS;
 }
 
 if (batchSendTime  timestamp) {
@@ -150,7 +150,7 @@ public class BatchSampleSender implement
 listener.processBatch(sampleStore);
 sampleStore.clear();
 }
-this.batchSendTime = timestamp + timeThreshold;
+this.batchSendTime = timestamp + TIME_THRESHOLD_MS;
 } catch (RemoteException err) {
 log.error(sampleOccurred, err);
 }

Modified: 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/StatisticalSampleSender.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/StatisticalSampleSender.java?rev=921796r1=921795r2=921796view=diff
==
--- 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/StatisticalSampleSender.java
 (original)
+++ 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/StatisticalSampleSender.java
 Thu Mar 11 10:52:18 2010
@@ -53,7 +53,7 @@ public class StatisticalSampleSender imp
 
 private int sampleCount;
 
-private final long timeThreshold = 
JMeterUtils.getPropDefault(time_threshold,
+private static final long TIME_THRESHOLD_MS = 
JMeterUtils.getPropDefault(time_threshold,
 DEFAULT_TIME_THRESHOLD);
 
 private long batchSendTime = -1;
@@ -76,7 +76,7 @@ public class StatisticalSampleSender imp
 StatisticalSampleSender(RemoteSampleListener listener) {
 this.listener = listener;
 log.info(Using batching for this run. +  Thresholds: num=
-+ numSamplesThreshold + , time= + timeThreshold);
++ numSamplesThreshold + , time= + TIME_THRESHOLD_MS);
 }
 
 /**
@@ -148,11 +148,11 @@ public class StatisticalSampleSender imp
 }
 }
 
-if (timeThreshold != -1) {
+if (TIME_THRESHOLD_MS != -1) {
 long now = System.currentTimeMillis();
 // Checking for and creating initial timestamp to cheak against
 if (batchSendTime == -1) {
-this.batchSendTime = now + timeThreshold;
+this.batchSendTime = now + TIME_THRESHOLD_MS;
 }
 
 if (batchSendTime  now) {
@@ -161,7 +161,7 @@ public class StatisticalSampleSender imp
 log.debug(Firing time);
 }
 sendBatch();
-this.batchSendTime = now + timeThreshold;
+this.batchSendTime = now + TIME_THRESHOLD_MS;
 } catch (RemoteException err) {
 log.warn(sampleOccurred

svn commit: r921807 - in /jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers: BatchSampleSender.java StatisticalSampleSender.java

2010-03-11 Thread sebb
Author: sebb
Date: Thu Mar 11 11:37:54 2010
New Revision: 921807

URL: http://svn.apache.org/viewvc?rev=921807view=rev
Log:
Simplify. Ensure only count or timer fire for a given sample.

Modified:

jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/BatchSampleSender.java

jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/StatisticalSampleSender.java

Modified: 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/BatchSampleSender.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/BatchSampleSender.java?rev=921807r1=921806r2=921807view=diff
==
--- 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/BatchSampleSender.java 
(original)
+++ 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/BatchSampleSender.java 
Thu Mar 11 11:37:54 2010
@@ -40,16 +40,16 @@ public class BatchSampleSender implement
 
 private static final long DEFAULT_TIME_THRESHOLD = 6L;
 
-private final RemoteSampleListener listener;
-
-private final ListSampleEvent sampleStore = new ArrayListSampleEvent();
-
-private final int numSamplesThreshold = 
+private static final int NUM_SAMPLES_THRESHOLD = 
 JMeterUtils.getPropDefault(num_sample_threshold, 
DEFAULT_NUM_SAMPLE_THRESHOLD); // $NON-NLS-1$
 
 private static final long TIME_THRESHOLD_MS =
 JMeterUtils.getPropDefault(time_threshold, DEFAULT_TIME_THRESHOLD); 
// $NON-NLS-1$
 
+private final RemoteSampleListener listener;
+
+private final ListSampleEvent sampleStore = new ArrayListSampleEvent();
+
 private long batchSendTime = -1;
 
 /**
@@ -69,7 +69,7 @@ public class BatchSampleSender implement
 BatchSampleSender(RemoteSampleListener listener) {
 this.listener = listener;
 log.info(Using batching for this run.
-+  Thresholds: num= + numSamplesThreshold
++  Thresholds: num= + NUM_SAMPLES_THRESHOLD
 + , time= + TIME_THRESHOLD_MS);
 }
 
@@ -121,41 +121,39 @@ public class BatchSampleSender implement
 public void sampleOccurred(SampleEvent e) {
 synchronized (sampleStore) {
 sampleStore.add(e);
+final int sampleCount = sampleStore.size();
 
-if (numSamplesThreshold != -1) {
-if (sampleStore.size() = numSamplesThreshold) {
-try {
-log.debug(Firing sample);
-listener.processBatch(sampleStore);
-sampleStore.clear();
-} catch (RemoteException err) {
-log.error(sampleOccurred, err);
-}
+boolean sendNow = false;
+if (NUM_SAMPLES_THRESHOLD != -1) {
+if (sampleCount = NUM_SAMPLES_THRESHOLD) {
+sendNow = true;
 }
 }
 
+long now = 0;
 if (TIME_THRESHOLD_MS != -1) {
-SampleResult sr = e.getResult();
-long timestamp = sr.getTimeStamp();
-
-// Checking for and creating initial timestamp to cheak against
+now = System.currentTimeMillis();
+// Checking for and creating initial timestamp to check against
 if (batchSendTime == -1) {
-this.batchSendTime = timestamp + TIME_THRESHOLD_MS;
+this.batchSendTime = now + TIME_THRESHOLD_MS;
+}
+if (batchSendTime  now  sampleCount  0) {
+sendNow = true;
 }
+}
 
-if (batchSendTime  timestamp) {
-try {
-log.debug(Firing time);
-if (sampleStore.size()  0) {
-listener.processBatch(sampleStore);
-sampleStore.clear();
-}
-this.batchSendTime = timestamp + TIME_THRESHOLD_MS;
-} catch (RemoteException err) {
-log.error(sampleOccurred, err);
+if (sendNow){
+try {
+log.debug(Firing sample);
+listener.processBatch(sampleStore);
+sampleStore.clear();
+if (TIME_THRESHOLD_MS != -1) {
+this.batchSendTime = now + TIME_THRESHOLD_MS;
 }
-}
+} catch (RemoteException err) {
+log.error(sampleOccurred, err);
+}
 }
-}
+} // synchronized(sampleStore)
 }
 }

Modified: 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/StatisticalSampleSender.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers

svn commit: r922051 - in /jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/math: StatCalculator.java StatCalculatorInteger.java StatCalculatorLong.java

2010-03-11 Thread sebb
Author: sebb
Date: Thu Mar 11 22:55:21 2010
New Revision: 922051

URL: http://svn.apache.org/viewvc?rev=922051view=rev
Log:
Implement addValue(T val, int sampleCount) method to simplify processing 
aggregated samples

Modified:
jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/math/StatCalculator.java

jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/math/StatCalculatorInteger.java

jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/math/StatCalculatorLong.java

Modified: 
jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/math/StatCalculator.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/math/StatCalculator.java?rev=922051r1=922050r2=922051view=diff
==
--- 
jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/math/StatCalculator.java 
(original)
+++ 
jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/math/StatCalculator.java 
Thu Mar 11 22:55:21 2010
@@ -191,29 +191,44 @@ public abstract class StatCalculatorT e
 return count;
 }
 
-public void addValue(T val) {
-updateValueCount(val);
-count++;
+protected abstract T divide(T val, int n);
+
+public void addValue(T val, int sampleCount) {
+updateValueCount(val, sampleCount);
+count += sampleCount;
 double currentVal = val.doubleValue();
 sum += currentVal;
-sumOfSquares += currentVal * currentVal;
+T actualValue = val;
+if (sampleCount  1){
+// For n values in an aggregate sample the average value = (val/n)
+// So need to add n * (val/n) * (val/n) = val * val / n
+sumOfSquares += currentVal * currentVal / sampleCount;
+actualValue = divide(val, sampleCount);
+} else {
+sumOfSquares += currentVal * currentVal;
+actualValue = val;
+}
 mean = sum / count;
 deviation = Math.sqrt((sumOfSquares / count) - (mean * mean));
-if (val.compareTo(max)  0){
-max=val;
+if (actualValue.compareTo(max)  0){
+max=actualValue;
 }
-if (val.compareTo(min)  0){
-min=val;
+if (actualValue.compareTo(min)  0){
+min=actualValue;
 }
 }
 
-private void updateValueCount(T val) {
+public void addValue(T val) {
+addValue(val,1);
+}
+
+private void updateValueCount(T val, int sampleCount) {
 MutableLong count = valuesMap.get(val);
 if (count != null) {
-count.increment();
+count.add(sampleCount);
 } else {
 // insert new value
-valuesMap.put(val, new MutableLong(1L));
+valuesMap.put(val, new MutableLong(sampleCount));
 }
 }
 }

Modified: 
jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/math/StatCalculatorInteger.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/math/StatCalculatorInteger.java?rev=922051r1=922050r2=922051view=diff
==
--- 
jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/math/StatCalculatorInteger.java
 (original)
+++ 
jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/math/StatCalculatorInteger.java
 Thu Mar 11 22:55:21 2010
@@ -30,4 +30,13 @@ public class StatCalculatorInteger exten
 public void addValue(int val){
 super.addValue(new Integer(val));
 }
+
+public void addValue(int val, int sampleCount){
+super.addValue(new Integer(val), sampleCount);
+}
+
+@Override
+protected Integer divide(Integer val, int n) {
+return new Integer(val.intValue() / n);
+}
 }

Modified: 
jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/math/StatCalculatorLong.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/math/StatCalculatorLong.java?rev=922051r1=922050r2=922051view=diff
==
--- 
jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/math/StatCalculatorLong.java
 (original)
+++ 
jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/math/StatCalculatorLong.java
 Thu Mar 11 22:55:21 2010
@@ -30,4 +30,13 @@ public class StatCalculatorLong extends 
 public void addValue(long val){
 super.addValue(new Long(val));
 }
+
+public void addValue(long val, int sampleCount){
+super.addValue(new Long(val), sampleCount);
+}
+
+@Override
+protected Long divide(Long val, int n) {
+return new Long(val.longValue() / n);
+}
 }



-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



svn commit: r922054 - /jakarta/jmeter/trunk/src/core/org/apache/jmeter/util/Calculator.java

2010-03-11 Thread sebb
Author: sebb
Date: Thu Mar 11 22:57:58 2010
New Revision: 922054

URL: http://svn.apache.org/viewvc?rev=922054view=rev
Log:
Correct calculation of min, max and std. deviation for aggregated samples

Modified:
jakarta/jmeter/trunk/src/core/org/apache/jmeter/util/Calculator.java

Modified: jakarta/jmeter/trunk/src/core/org/apache/jmeter/util/Calculator.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/util/Calculator.java?rev=922054r1=922053r2=922054view=diff
==
--- jakarta/jmeter/trunk/src/core/org/apache/jmeter/util/Calculator.java 
(original)
+++ jakarta/jmeter/trunk/src/core/org/apache/jmeter/util/Calculator.java Thu 
Mar 11 22:57:58 2010
@@ -73,11 +73,19 @@ public class Calculator {
 
 private void addValue(long newValue, int sampleCount) {
 count += sampleCount;
-minimum=Math.min(newValue, minimum);
-maximum=Math.max(newValue, maximum);
 double currentVal = newValue;
 sum += currentVal;
-sumOfSquares += currentVal * currentVal;
+if (sampleCount  1){
+minimum=Math.min(newValue/sampleCount, minimum);
+maximum=Math.max(newValue/sampleCount, maximum);
+// For n values in an aggregate sample the average value = (val/n)
+// So need to add n * (val/n) * (val/n) = val * val / n
+sumOfSquares += (currentVal * currentVal) / (sampleCount);
+} else {
+minimum=Math.min(newValue, minimum);
+maximum=Math.max(newValue, maximum);
+sumOfSquares += currentVal * currentVal;
+}
 // Calculate each time, as likely to be called for each add
 mean = sum / count;
 deviation = Math.sqrt((sumOfSquares / count) - (mean * mean));



-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



svn commit: r922055 - /jakarta/jmeter/trunk/src/core/org/apache/jmeter/visualizers/SamplingStatCalculator.java

2010-03-11 Thread sebb
Author: sebb
Date: Thu Mar 11 23:00:43 2010
New Revision: 922055

URL: http://svn.apache.org/viewvc?rev=922055view=rev
Log:
Simplify (and tweak accuracy) by using new addValue(T val, int count) method

Modified:

jakarta/jmeter/trunk/src/core/org/apache/jmeter/visualizers/SamplingStatCalculator.java

Modified: 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/visualizers/SamplingStatCalculator.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/visualizers/SamplingStatCalculator.java?rev=922055r1=922054r2=922055view=diff
==
--- 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/visualizers/SamplingStatCalculator.java
 (original)
+++ 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/visualizers/SamplingStatCalculator.java
 Thu Mar 11 23:00:43 2010
@@ -150,20 +150,8 @@ public class SamplingStatCalculator {
 double throughput;
 boolean rbool;
 synchronized (calculator) {
-long byteslength = res.getBytes();
-// if there was more than 1 loop in the sample, we
-// handle it appropriately
-if (res.getSampleCount()  1) {
-long time = res.getTime() / res.getSampleCount();
-long resbytes = byteslength / res.getSampleCount();
-for (int idx = 0; idx  res.getSampleCount(); idx++) {
-calculator.addValue(time);
-calculator.addBytes(resbytes);
-}
-} else {
-calculator.addValue(res.getTime());
-calculator.addBytes(byteslength);
-}
+calculator.addValue(res.getTime(), res.getSampleCount());
+calculator.addBytes(res.getBytes());
 setStartTime(res);
 eCount = getCurrentSample().getErrorCount();
 if (!res.isSuccessful()) {



-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



svn commit: r922067 - /jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/math/StatCalculator.java

2010-03-11 Thread sebb
Author: sebb
Date: Thu Mar 11 23:30:34 2010
New Revision: 922067

URL: http://svn.apache.org/viewvc?rev=922067view=rev
Log:
Fix up values map for aggregate samples

Modified:
jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/math/StatCalculator.java

Modified: 
jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/math/StatCalculator.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/math/StatCalculator.java?rev=922067r1=922066r2=922067view=diff
==
--- 
jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/math/StatCalculator.java 
(original)
+++ 
jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/math/StatCalculator.java 
Thu Mar 11 23:30:34 2010
@@ -194,7 +194,6 @@ public abstract class StatCalculatorT e
 protected abstract T divide(T val, int n);
 
 public void addValue(T val, int sampleCount) {
-updateValueCount(val, sampleCount);
 count += sampleCount;
 double currentVal = val.doubleValue();
 sum += currentVal;
@@ -208,6 +207,7 @@ public abstract class StatCalculatorT e
 sumOfSquares += currentVal * currentVal;
 actualValue = val;
 }
+updateValueCount(actualValue, sampleCount);
 mean = sum / count;
 deviation = Math.sqrt((sumOfSquares / count) - (mean * mean));
 if (actualValue.compareTo(max)  0){
@@ -222,13 +222,13 @@ public abstract class StatCalculatorT e
 addValue(val,1);
 }
 
-private void updateValueCount(T val, int sampleCount) {
-MutableLong count = valuesMap.get(val);
+private void updateValueCount(T actualValue, int sampleCount) {
+MutableLong count = valuesMap.get(actualValue);
 if (count != null) {
 count.add(sampleCount);
 } else {
 // insert new value
-valuesMap.put(val, new MutableLong(sampleCount));
+valuesMap.put(actualValue, new MutableLong(sampleCount));
 }
 }
 }



-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



svn commit: r922069 - /jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/StatisticalSampleResult.java

2010-03-11 Thread sebb
Author: sebb
Date: Thu Mar 11 23:33:24 2010
New Revision: 922069

URL: http://svn.apache.org/viewvc?rev=922069view=rev
Log:
Bug 48889 - Wrong response time with mode=Statistical and num_sample_threshold 
 1
Maintain elapsed time locally; change to threadName key to allow its use in 
aggregate sample

Modified:

jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/StatisticalSampleResult.java

Modified: 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/StatisticalSampleResult.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/StatisticalSampleResult.java?rev=922069r1=922068r2=922069view=diff
==
--- 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/StatisticalSampleResult.java
 (original)
+++ 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/StatisticalSampleResult.java
 Thu Mar 11 23:33:24 2010
@@ -28,10 +28,13 @@ import java.io.Serializable;
 public class StatisticalSampleResult extends SampleResult implements
 Serializable {
 
-private static final long serialVersionUID = 24L;
+private static final long serialVersionUID = 240L;
 
 private int errorCount;
 
+// Need to maintain our own elapsed timer to ensure more accurate 
aggregation
+private long elapsed;
+
 public StatisticalSampleResult(){// May be called by XStream
 }
 
@@ -51,10 +54,11 @@ public class StatisticalSampleResult ext
 public StatisticalSampleResult(SampleResult res) {
 // Copy data that is shared between samples (i.e. the key items):
 setSampleLabel(res.getSampleLabel());
-// Nothing else can be saved, as the samples may come from any thread
+setThreadName(res.getThreadName());
 
 setSuccessful(true); // Assume result is OK
 setSampleCount(0); // because we add the sample count in later
+elapsed = 0;
 }
 
 public void add(SampleResult res) {
@@ -79,11 +83,12 @@ public class StatisticalSampleResult ext
 
 setLatency(getLatency()+ res.getLatency());
 
+elapsed += res.getTime();
 }
 
 @Override
 public long getTime() {
-return getEndTime() - getStartTime() - this.getIdleTime();
+return elapsed;
 }
 
 @Override
@@ -103,7 +108,7 @@ public class StatisticalSampleResult ext
 
 /**
  * Generates the key to be used for aggregating samples as follows:br/
- * codesampleLabel/code - codethreadGroup/code
+ * codesampleLabel/code - codethreadName/code
  *
  * N.B. the key should agree with the fixed items that are saved in the 
sample.
  *
@@ -112,7 +117,8 @@ public class StatisticalSampleResult ext
  */
 public static String getKey(SampleEvent event) {
 StringBuilder sb = new StringBuilder(80);
-
sb.append(event.getResult().getSampleLabel()).append(-).append(event.getThreadGroup());
+sb.append(event.getResult().getSampleLabel());
+sb.append('-').append(event.getResult().getThreadName());
 return sb.toString();
 }
 }



-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



svn commit: r922072 - /jakarta/jmeter/trunk/xdocs/changes.xml

2010-03-11 Thread sebb
Author: sebb
Date: Thu Mar 11 23:35:58 2010
New Revision: 922072

URL: http://svn.apache.org/viewvc?rev=922072view=rev
Log:
Bug 48889 - Wrong response time with mode=Statistical and num_sample_threshold 
 1
See also SVN revisions: 922069,922067,922055,922054,922051

Modified:
jakarta/jmeter/trunk/xdocs/changes.xml

Modified: jakarta/jmeter/trunk/xdocs/changes.xml
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/xdocs/changes.xml?rev=922072r1=922071r2=922072view=diff
==
--- jakarta/jmeter/trunk/xdocs/changes.xml (original)
+++ jakarta/jmeter/trunk/xdocs/changes.xml Thu Mar 11 23:35:58 2010
@@ -111,6 +111,8 @@ The XPath Assertion and XPath Extractor 
 h3Listeners/h3
 ul
 liBug 48603 - Mailer Visualiser sends two emails for a single failed 
response/li
+liCorrect calculation of min/max/std.dev for aggregated samples (Summary 
Report)/li
+liBug 48889 - Wrong response time with mode=Statistical and 
num_sample_threshold  1/li
 /ul
 
 h3Assertions/h3



-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



svn commit: r922086 - /jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleEvent.java

2010-03-11 Thread sebb
Author: sebb
Date: Fri Mar 12 00:35:36 2010
New Revision: 922086

URL: http://svn.apache.org/viewvc?rev=922086view=rev
Log:
Give clue if AIOBE occurs

Modified:
jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleEvent.java

Modified: 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleEvent.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleEvent.java?rev=922086r1=922085r2=922086view=diff
==
--- jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleEvent.java 
(original)
+++ jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleEvent.java 
Fri Mar 12 00:35:36 2010
@@ -25,6 +25,7 @@ import java.net.UnknownHostException;
 import org.apache.jmeter.threads.JMeterVariables;
 import org.apache.jmeter.util.JMeterUtils;
 import org.apache.jorphan.logging.LoggingManager;
+import org.apache.jorphan.util.JMeterError;
 import org.apache.log.Logger;
 
 /**
@@ -142,7 +143,11 @@ public class SampleEvent implements Seri
 
 /** Get the nth variable value (zero-based) */
 public String getVarValue(int i){
-return values[i];
+try {
+return values[i];
+} catch (ArrayIndexOutOfBoundsException e) {
+throw new JMeterError(Check the sample_variable settings!, e);
+}
 }
 
 public SampleResult getResult() {



-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



svn commit: r920175 - /jakarta/jmeter/trunk/xdocs/usermanual/component_reference.xml

2010-03-07 Thread sebb
Author: sebb
Date: Mon Mar  8 02:38:43 2010
New Revision: 920175

URL: http://svn.apache.org/viewvc?rev=920175view=rev
Log:
Bit more info on JUnit4

Modified:
jakarta/jmeter/trunk/xdocs/usermanual/component_reference.xml

Modified: jakarta/jmeter/trunk/xdocs/usermanual/component_reference.xml
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/xdocs/usermanual/component_reference.xml?rev=920175r1=920174r2=920175view=diff
==
--- jakarta/jmeter/trunk/xdocs/usermanual/component_reference.xml (original)
+++ jakarta/jmeter/trunk/xdocs/usermanual/component_reference.xml Mon Mar  8 
02:38:43 2010
@@ -1319,8 +1319,13 @@
 li@Test - used to find test methods and classes. The expected and 
timeout attributes are supported./li
 li@Before - treated the same as setUp() in JUnit3/li
 li@After - treated the same as tearDown() in JUnit3/li
+li@BeforeClass, @AfterClass - treated as test methods so they can be run 
independently as required/li
 /ul
 /p
+p
+Note that JMeter currently runs the test methods directly, rather than leaving 
it to JUnit.
+This is to allow the setUp/tearDown methods to be excluded from the sample 
time. 
+/p
 /component
 
 component name=Mail Reader Sampler  index=sect-num;.1.17  width=399 
height=306 screenshot=mailreader_sampler.png



-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



svn commit: r920176 - /jakarta/jmeter/trunk/src/junit/test/Junit4AnnotationsTest.java

2010-03-07 Thread sebb
Author: sebb
Date: Mon Mar  8 02:39:16 2010
New Revision: 920176

URL: http://svn.apache.org/viewvc?rev=920176view=rev
Log:
New dummy test for main all JUnit4 annotations

Added:
jakarta/jmeter/trunk/src/junit/test/Junit4AnnotationsTest.java   (with 
props)

Added: jakarta/jmeter/trunk/src/junit/test/Junit4AnnotationsTest.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/junit/test/Junit4AnnotationsTest.java?rev=920176view=auto
==
--- jakarta/jmeter/trunk/src/junit/test/Junit4AnnotationsTest.java (added)
+++ jakarta/jmeter/trunk/src/junit/test/Junit4AnnotationsTest.java Mon Mar  8 
02:39:16 2010
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the License); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package test;
+
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * Test to demonstrate all the common method annotations
+ */
+public class Junit4AnnotationsTest {
+
+@BeforeClass
+public static void beforeClass(){
+System.out.println(beforeClass);
+}
+@Before
+public void before(){
+System.out.println(before);
+}
+
+@Test
+public void test(){
+System.out.println(test);
+}
+
+@After
+public void after(){
+System.out.println(after);
+}
+
+@AfterClass
+public static void afterClass(){
+System.out.println(afterClass);
+}
+}

Propchange: jakarta/jmeter/trunk/src/junit/test/Junit4AnnotationsTest.java
--
svn:eol-style = native

Propchange: jakarta/jmeter/trunk/src/junit/test/Junit4AnnotationsTest.java
--
svn:keywords = Author Date Id Revision



-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



svn commit: r919806 - /jakarta/jmeter/trunk/src/core/org/apache/jmeter/engine/TreeCloner.java

2010-03-06 Thread sebb
Author: sebb
Date: Sat Mar  6 17:52:28 2010
New Revision: 919806

URL: http://svn.apache.org/viewvc?rev=919806view=rev
Log:
Make private fields final.
Rename and rearrange code to make a bit clearer.

Modified:
jakarta/jmeter/trunk/src/core/org/apache/jmeter/engine/TreeCloner.java

Modified: jakarta/jmeter/trunk/src/core/org/apache/jmeter/engine/TreeCloner.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/engine/TreeCloner.java?rev=919806r1=919805r2=919806view=diff
==
--- jakarta/jmeter/trunk/src/core/org/apache/jmeter/engine/TreeCloner.java 
(original)
+++ jakarta/jmeter/trunk/src/core/org/apache/jmeter/engine/TreeCloner.java Sat 
Mar  6 17:52:28 2010
@@ -28,23 +28,36 @@
 
 public class TreeCloner implements HashTreeTraverser {
 
-private ListedHashTree newTree;
+private final ListedHashTree newTree;
 
-private LinkedListObject objects = new LinkedListObject();
+private final LinkedListObject objects = new LinkedListObject();
 
-private boolean forThread = true;
+private final boolean honourNoThreadClone;
 
+/**
+ * Clone the test tree, honouring NoThreadClone markers.
+ * 
+ */
 public TreeCloner() {
 this(true);
 }
 
-public TreeCloner(boolean forThread) {
+/**
+ * Clone the test tree.
+ * 
+ * @param honourNoThreadClone set false to clone NoThreadClone nodes as 
well
+ */
+public TreeCloner(boolean honourNoThreadClone) {
 newTree = new ListedHashTree();
-this.forThread = forThread;
+this.honourNoThreadClone = honourNoThreadClone;
 }
 
 public void addNode(Object node, HashTree subTree) {
-if ((!forThread || !(node instanceof NoThreadClone))  (node 
instanceof TestElement)) {
+
+if ( (node instanceof TestElement) // Check can cast for clone
+   // Don't clone NoThreadClone unless honourNoThreadClone == false
+   (!honourNoThreadClone || !(node instanceof NoThreadClone))
+) {
 node = ((TestElement) node).clone();
 newTree.add(objects, node);
 } else {



-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



svn commit: r919850 - in /jakarta/jmeter/trunk: src/core/org/apache/jmeter/engine/ClientJMeterEngine.java xdocs/changes.xml

2010-03-06 Thread sebb
Author: sebb
Date: Sat Mar  6 21:02:34 2010
New Revision: 919850

URL: http://svn.apache.org/viewvc?rev=919850view=rev
Log:
Bug 48350 - Deadlock on distributed testing with 2 clients

Modified:

jakarta/jmeter/trunk/src/core/org/apache/jmeter/engine/ClientJMeterEngine.java
jakarta/jmeter/trunk/xdocs/changes.xml

Modified: 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/engine/ClientJMeterEngine.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/engine/ClientJMeterEngine.java?rev=919850r1=919849r2=919850view=diff
==
--- 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/engine/ClientJMeterEngine.java 
(original)
+++ 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/engine/ClientJMeterEngine.java 
Sat Mar  6 21:02:34 2010
@@ -39,6 +39,8 @@
 public class ClientJMeterEngine implements JMeterEngine, Runnable {
 private static final Logger log = LoggingManager.getLoggerForClass();
 
+private static final Object LOCK = new Object();
+
 private RemoteJMeterEngine remote;
 
 private HashTree test;
@@ -119,7 +121,15 @@
 
 try {
 JMeterContextService.startTest();
-remote.configure(test, host);
+/*
+ * Add fix for Deadlocks, see:
+ * 
+ * See https://issues.apache.org/bugzilla/show_bug.cgi?id=48350
+*/
+synchronized(LOCK)
+{
+remote.configure(testTree, host);
+}
 log.info(sent test to  + host);
 if (savep != null){
 log.info(Sending properties +savep);

Modified: jakarta/jmeter/trunk/xdocs/changes.xml
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/xdocs/changes.xml?rev=919850r1=919849r2=919850view=diff
==
--- jakarta/jmeter/trunk/xdocs/changes.xml (original)
+++ jakarta/jmeter/trunk/xdocs/changes.xml Sat Mar  6 21:02:34 2010
@@ -130,6 +130,7 @@
 liBug 47646 -  NullPointerException in the Random Variable element/li
 liDisallow adding any child elements to JDBC Configuration/li
 liBeanInfoSupport now caches getBeanDescriptor() - should avoid an NPE on 
non-Sun JVMs when using CSVDataSet (and some other TestBeans)/li
+liBug 48350 - Deadlock on distributed testing with 2 clients/li
 /ul
 
 !--  --



-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



svn commit: r919857 - /jakarta/jmeter/trunk/src/components/org/apache/jmeter/assertions/SizeAssertion.java

2010-03-06 Thread sebb
Author: sebb
Date: Sat Mar  6 21:37:34 2010
New Revision: 919857

URL: http://svn.apache.org/viewvc?rev=919857view=rev
Log:
Eliminate unnecessary instance variable

Modified:

jakarta/jmeter/trunk/src/components/org/apache/jmeter/assertions/SizeAssertion.java

Modified: 
jakarta/jmeter/trunk/src/components/org/apache/jmeter/assertions/SizeAssertion.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/components/org/apache/jmeter/assertions/SizeAssertion.java?rev=919857r1=919856r2=919857view=diff
==
--- 
jakarta/jmeter/trunk/src/components/org/apache/jmeter/assertions/SizeAssertion.java
 (original)
+++ 
jakarta/jmeter/trunk/src/components/org/apache/jmeter/assertions/SizeAssertion.java
 Sat Mar  6 21:37:34 2010
@@ -37,8 +37,6 @@
 
 private static final long serialVersionUID = 233L;
 
-private transient String comparatorErrorMessage;// Only used for 
communication with compareSize()
-
 // * Static int to signify the type of logical comparitor to assert
 public final static int EQUAL = 1;
 
@@ -79,9 +77,10 @@
 resultSize = response.getBytes();
 }
 // is the Sample the correct size?
-if (!(compareSize(resultSize))) {
+final String msg = compareSize(resultSize);
+if (msg.length()  0) {
 result.setFailure(true);
-Object[] arguments = { new Long(resultSize), 
comparatorErrorMessage, new Long(getAllowedSize()) };
+Object[] arguments = { new Long(resultSize), msg, new 
Long(getAllowedSize()) };
 String message = 
MessageFormat.format(JMeterUtils.getResString(size_assertion_failure), 
arguments); //$NON-NLS-1$
 result.setFailureMessage(message);
 }
@@ -142,7 +141,8 @@
  * than eqaul, less than equal, .
  * 
  */
-private boolean compareSize(long resultSize) {
+private String compareSize(long resultSize) {
+String comparatorErrorMessage;
 boolean result = false;
 int comp = getCompOper();
 switch (comp) {
@@ -175,6 +175,6 @@
 comparatorErrorMessage = ERROR - invalid condition;
 break;
 }
-return result;
+return result ?  : comparatorErrorMessage;
 }
 }



-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



svn commit: r919915 - in /jakarta/jmeter/trunk: docs/images/screenshots/junit_sampler.png xdocs/images/screenshots/junit_sampler.png xdocs/usermanual/component_reference.xml

2010-03-06 Thread sebb
Author: sebb
Date: Sun Mar  7 02:52:29 2010
New Revision: 919915

URL: http://svn.apache.org/viewvc?rev=919915view=rev
Log:
Add details of JUnit4 support

Modified:
jakarta/jmeter/trunk/docs/images/screenshots/junit_sampler.png
jakarta/jmeter/trunk/xdocs/images/screenshots/junit_sampler.png
jakarta/jmeter/trunk/xdocs/usermanual/component_reference.xml

Modified: jakarta/jmeter/trunk/docs/images/screenshots/junit_sampler.png
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/docs/images/screenshots/junit_sampler.png?rev=919915r1=919914r2=919915view=diff
==
Binary files - no diff available.

Modified: jakarta/jmeter/trunk/xdocs/images/screenshots/junit_sampler.png
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/xdocs/images/screenshots/junit_sampler.png?rev=919915r1=919914r2=919915view=diff
==
Binary files - no diff available.

Modified: jakarta/jmeter/trunk/xdocs/usermanual/component_reference.xml
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/xdocs/usermanual/component_reference.xml?rev=919915r1=919914r2=919915view=diff
==
--- jakarta/jmeter/trunk/xdocs/usermanual/component_reference.xml (original)
+++ jakarta/jmeter/trunk/xdocs/usermanual/component_reference.xml Sun Mar  7 
02:52:29 2010
@@ -1251,7 +1251,7 @@
 
 
 
-component name=JUnit Request index=sect-num;.1.16  width=525 
height=479 screenshot=junit_sampler.png
+component name=JUnit Request index=sect-num;.1.16  width=457 
height=507 screenshot=junit_sampler.png
 description
 The current implementation supports standard Junit convention and extensions. 
It also
 includes extensions like oneTimeSetUp and oneTimeTearDown. The sampler works 
like the
@@ -1294,6 +1294,7 @@
 /description
 properties
   property name=Name required=Descriptive name for this element that is 
shown in the tree./property
+  property name=Search for JUnit4 annotations required=YesSelect this to 
search for JUnit 4 tests (@Test annotations)/property
   property name=Package filter required=Comma separated list of packages 
to show. Example, org.apache.jmeter,junit.framework./property
   property name=Class name required=YesFully qualified name of the JUnit 
test class./property
   property name=Constructor string required=String pass to the string 
constructor. If a string is set, the sampler will use the
@@ -1312,6 +1313,14 @@
   property name=Append assertion errors required=YesWhether or not to 
append assertion errors to the response message./property
   property name=Append runtime exceptions required=YesWhether or not to 
append runtime exceptions to the response message. Only applies if Append 
assertion errors is not selected./property
 /properties
+p
+The following JUnit4 annotations are recognised:
+ul
+li@Test - used to find test methods and classes. The expected and 
timeout attributes are supported./li
+li@Before - treated the same as setUp() in JUnit3/li
+li@After - treated the same as tearDown() in JUnit3/li
+/ul
+/p
 /component
 
 component name=Mail Reader Sampler  index=sect-num;.1.17  width=399 
height=306 screenshot=mailreader_sampler.png



-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



Re: Rampup strategy / logic

2010-03-02 Thread sebb
On 02/03/2010, Brett Cave brettc...@gmail.com wrote:
 Hi,

  A thought on the logic used for thread groups:

  As a JMeter user, would I want to configure a total number of users to
  simulate over a time period, with delays in order to achieve this, or would
  it be more practical from a testing point of view to set a target
  Concurrent threads with a ramp-up period to get to this number of threads?

  The current logic caters for the first scenario:

  float perThreadDelay = ((float) (rampUp * 1000) / (float) numThreads);
  for (int i = 0; running  i  numThreads; i++) {
 
 jmeterThread.setInitialDelay((int) (perThreadDelay * i));
  }

  So if I set # threads in a group to 100 with a rampup of 100, then I will
  get 100 threads in total, with each thread starting up 1 second after the
  last.

  My original thinking when designing the plan was target concurrent threads
  at end of rampup period.

  Would it be a useful feature to have a thread group that can ramp up to the
  target number of threads started at 1 point in time over the period (could
  add a checkbox to the GUI to specify Final Concurrent instead of total
  number over test duration?

  The calculation shouldn't be too complex, and it could be nice to have this
  feature to simulate increasing load.

  Thoughts on this?

If all the threads last long enough, then the current ramp-up time
will work as you want.

However, if the first threads finish before the last threads start,
then of course the number of concurrent threads at the end of the
ramp-up will be less than the total number of threads.

Regardless of how the threads are started, if the first threads don't
last long enough, then the number of active threads at the end of the
ramp-up will be less than the total.

-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



Re: Beanshell and BSF performance

2010-02-26 Thread sebb
On 26/02/2010, James Pharaoh ja...@phsys.co.uk wrote:
 Hi,

  I notice both these scripting facilities seem to recompile the script
  every time they are used. I'm pretty sure this shouldn't be necessary
  and that the performance could be increased significantly by compiling
  once. Does anyone know any good reason this is not done?

Because one would have to keep track of whether the script changed
during the test run, e.g. because the GUI used variable or function
references. Or indeed another script might change the script file
(unlikely, but there might be a use case for this).

  Unless someone can demonstrate that it's too difficult, I'm going to
  attempt to do this myself.

In the case of BeanShell, just use a .bshrc file to define as much as
possible using methods etc. and then just call the method in the GUI.

The bshrc files are loaded once per thread.

Not all BSF languages support compiled scripts, but for the ones that
do, it should be possible to keep track of the source and recompile
accordingly. Any such caching would need to be optional, as existing
tests might implicitly rely on the fact that the scripts are not
re-used.

  Thanks,
  James

  -
  To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
  For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



Re: Beanshell and BSF performance

2010-02-26 Thread sebb
On 26/02/2010, James Pharaoh ja...@phsys.co.uk wrote:
 2010/2/26 sebb seb...@gmail.com:

  On 26/02/2010, James Pharaoh ja...@phsys.co.uk wrote:

   I notice both these scripting facilities seem to recompile the script
every time they are used. I'm pretty sure this shouldn't be necessary
and that the performance could be increased significantly by compiling
once. Does anyone know any good reason this is not done?
   Because one would have to keep track of whether the script changed
   during the test run, e.g. because the GUI used variable or function
   references. Or indeed another script might change the script file
   (unlikely, but there might be a use case for this).


 So in this case you could store scripts based on the hash code of the
  string, or the timestamp and/or hash code of the file. There could
  even be an option to always recompile, always reuse or always check.

Patches welcome; please use Bugzilla to raise an enhancement request
and attach the patches to that.


  James

  -
  To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
  For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



Re: JMeter and lib/ext classpath

2010-02-25 Thread sebb
On 25/02/2010, Brett Cave brettc...@gmail.com wrote:
 Hi,

  At which point is a class that extends AbstractTestElement?

Huh?

  Would it be safe to use static attributes after super() in the default
  constructor?


If they are final, yes.

Otherwise, it depends. Might need to to implement NoThreadClone.

-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



svn commit: r915933 - /jakarta/jmeter/trunk/xdocs/usermanual/get-started.xml

2010-02-24 Thread sebb
Author: sebb
Date: Wed Feb 24 19:17:39 2010
New Revision: 915933

URL: http://svn.apache.org/viewvc?rev=915933view=rev
Log:
Improve docn of -G option

Modified:
jakarta/jmeter/trunk/xdocs/usermanual/get-started.xml

Modified: jakarta/jmeter/trunk/xdocs/usermanual/get-started.xml
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/xdocs/usermanual/get-started.xml?rev=915933r1=915932r2=915933view=diff
==
--- jakarta/jmeter/trunk/xdocs/usermanual/get-started.xml (original)
+++ jakarta/jmeter/trunk/xdocs/usermanual/get-started.xml Wed Feb 24 19:17:39 
2010
@@ -282,6 +282,7 @@
 p-n This specifies JMeter is to run in non-gui mode/p
 p-t [name of JMX file that contains the Test Plan]./p
 p-l [name of JTL file to log sample results to]./p
+p-j [name of JMeter run log file]./p
 p-r Run the test in the servers specified by the JMeter property 
remote_hosts/p
 p-R [list of remote servers] Run the test in the specified remote servers/p
 pThe script also lets you specify the optional firewall/proxy server 
information:/p
@@ -302,7 +303,7 @@
 /p
 pTo run the test from the client in non-GUI mode, use the following 
command:/p
 pre
-jmeter -n -t testplan.jmx -r [-Gprop=val] [-Z]
+jmeter -n -t testplan.jmx -r [-Gprop=val] [-Gglobal.properties] [-Z]
 where:
 -G is used to define JMeter properties to be set in the servers
 -X means exit the servers at the end of the test
@@ -317,6 +318,7 @@
 p-D[prop_name]=[value] - defines a java system property value./p
 p-J[prop name]=[value] - defines a local JMeter property./p
 p-G[prop name]=[value] - defines a JMeter property to be sent to all remote 
servers./p
+p-G[propertyfile] - defines a file containing JMeter properties to be sent 
to all remote servers./p
 p-L[category]=[priority] - overrides a logging setting, setting a particular 
category to the given priority level./p
 pThe -L flag can also be used without the category name to set the root 
logging level./p
pbExamples/b:



-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



Re: Effectively monitoring target resources with jmeter?

2010-02-24 Thread sebb
On 24/02/2010, Brett Cave brettc...@gmail.com wrote:
 On Wed, Feb 24, 2010 at 9:07 PM, sebb seb...@gmail.com wrote:

   On 24/02/2010, Brett Cave brettc...@gmail.com wrote:
MysqlCollector plugin added to JMeter wiki:
   
 http://wiki.apache.org/jakarta-jmeter/MysqlCollectorPlugin (check
 attachments for the patch).
  

  Have a look at the Summariser class - this uses the TestListener
   interface for setUp/tearDown of items that are needed for each test.
   This could be used for setting up and closing the connection etc.
  


 Ok perfect, will do that. Used the ResultSaver class for reference to get
  familiar with plugin development,


  
   Most of the code is generic SQL - however the database creation is not.
   Since that only has to be done once, it could be done outside JMeter.
  

  By database creation, do you mean table creation or setting up of the
  connection? The table will only be created if it doesn't exist and the
  create table option is selected from the GUI.



Table creation.

Users may wish to use Derby or Oracle or some other database.

So long as the appropriate column names and types are created, the
rest of the code should then work with any JDBC database.


   Provided that you implement the correct interface(s), JMeter will find
   the add-ons.
   That's how it finds all the existing samplers and listeners etc.
   Just put them in a jar and put the jar in lib/ext.
  
   To avoid problems with missing properties, override getStaticLabel()
   rather than getLabelResource().
  


 Great, will do. Not sure why it was looking for the default org.apache
  package. The code was originally in org.apache, but then moved to a new one,
  re-archived the jar in lib/ext (with JMeter closed) and then started JMeter
  again. possibly cached classes somewhere?


JMeter does not cache classes between runs.



   Or use the TestBean method for implementing the GUI; each class has
   its own resource file.
  
   This is starting to be more appropriate for the JMeter developer
   mailing list ...
  


 Done


-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



svn commit: r915966 - in /jakarta/jmeter/trunk: docs/images/screenshots/ src/core/org/apache/jmeter/resources/ src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/gui/ xdocs/images/screenshots/

2010-02-24 Thread sebb
Author: sebb
Date: Wed Feb 24 20:26:22 2010
New Revision: 915966

URL: http://svn.apache.org/viewvc?rev=915966view=rev
Log:
Fix up Mail Reader Sampler GUI

Modified:
jakarta/jmeter/trunk/docs/images/screenshots/mailreader_sampler.png

jakarta/jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties

jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/gui/MailReaderSamplerGui.java
jakarta/jmeter/trunk/xdocs/images/screenshots/mailreader_sampler.png
jakarta/jmeter/trunk/xdocs/usermanual/component_reference.xml

Modified: jakarta/jmeter/trunk/docs/images/screenshots/mailreader_sampler.png
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/docs/images/screenshots/mailreader_sampler.png?rev=915966r1=915965r2=915966view=diff
==
Binary files - no diff available.

Modified: 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties?rev=915966r1=915965r2=915966view=diff
==
--- 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties 
(original)
+++ 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties 
Wed Feb 24 20:26:22 2010
@@ -462,8 +462,8 @@
 mail_reader_password=Password:
 mail_reader_port=Server Port (optional):
 mail_reader_server=Server Host:
-mail_reader_server_type=JavaMail Protocol (e.g. pop3, imaps):
-mail_reader_storemime=Store the message using MIME
+mail_reader_server_type=Protocol (e.g. pop3, imaps):
+mail_reader_storemime=Store the message using MIME (raw)
 mail_reader_title=Mail Reader Sampler
 mail_sent=Mail sent successfully
 mailer_attributes_panel=Mailing attributes

Modified: 
jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/gui/MailReaderSamplerGui.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/gui/MailReaderSamplerGui.java?rev=915966r1=915965r2=915966view=diff
==
--- 
jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/gui/MailReaderSamplerGui.java
 (original)
+++ 
jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/gui/MailReaderSamplerGui.java
 Wed Feb 24 20:26:22 2010
@@ -17,13 +17,18 @@
  */
 package org.apache.jmeter.protocol.mail.sampler.gui;
 
+import java.awt.BorderLayout;
+import java.awt.GridBagConstraints;
+import java.awt.GridBagLayout;
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
 import java.awt.event.FocusEvent;
 import java.awt.event.FocusListener;
 
+import javax.swing.Box;
 import javax.swing.ButtonGroup;
 import javax.swing.JCheckBox;
+import javax.swing.JComponent;
 import javax.swing.JLabel;
 import javax.swing.JPanel;
 import javax.swing.JRadioButton;
@@ -32,11 +37,11 @@
 import javax.swing.event.ChangeListener;
 
 import org.apache.jmeter.gui.util.HorizontalPanel;
+import org.apache.jmeter.gui.util.VerticalPanel;
 import org.apache.jmeter.protocol.mail.sampler.MailReaderSampler;
 import org.apache.jmeter.samplers.gui.AbstractSamplerGui;
 import org.apache.jmeter.testelement.TestElement;
 import org.apache.jmeter.util.JMeterUtils;
-import org.apache.jorphan.gui.layout.VerticalLayout;
 
 public class MailReaderSamplerGui extends AbstractSamplerGui implements 
ActionListener, FocusListener {
 
@@ -157,54 +162,36 @@
 mrs.setStoreMimeMessage(storeMimeMessageBox.isSelected());
 }
 
-// TODO - fix GUI layout problems
-
 /*
  * Helper method to set up the GUI screen
  */
 private void init() {
-setLayout(new VerticalLayout(5, VerticalLayout.BOTH, 
VerticalLayout.TOP));
+setLayout(new BorderLayout());
 setBorder(makeBorder());
-add(makeTitlePanel());
 
-JPanel serverTypePanel = new JPanel();
-serverTypePanel.add(new JLabel(ServerTypeLabel));
+JPanel settingsPanel = new JPanel(new GridBagLayout());
+GridBagConstraints gbc = getConstraints();
+
 serverTypeBox = new JTextField(20);
 serverTypeBox.addActionListener(this);
 serverTypeBox.addFocusListener(this);
-serverTypePanel.add(serverTypeBox);
-add(serverTypePanel);
-
-JPanel serverPanel = new JPanel();
-serverPanel.add(new JLabel(ServerLabel));
+addField(settingsPanel, ServerTypeLabel, serverTypeBox, gbc);
+
 serverBox = new JTextField(20);
-serverPanel.add(serverBox);
-add(serverPanel);
+addField(settingsPanel, ServerLabel, serverBox, gbc);
 
-JPanel portPanel = new JPanel();
-portPanel.add(new JLabel(PortLabel));
 portBox = new JTextField(20

svn commit: r916042 - /jakarta/jmeter/trunk/xdocs/usermanual/component_reference.xml

2010-02-24 Thread sebb
Author: sebb
Date: Wed Feb 24 23:44:35 2010
New Revision: 916042

URL: http://svn.apache.org/viewvc?rev=916042view=rev
Log:
tweak

Modified:
jakarta/jmeter/trunk/xdocs/usermanual/component_reference.xml

Modified: jakarta/jmeter/trunk/xdocs/usermanual/component_reference.xml
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/xdocs/usermanual/component_reference.xml?rev=916042r1=916041r2=916042view=diff
==
--- jakarta/jmeter/trunk/xdocs/usermanual/component_reference.xml (original)
+++ jakarta/jmeter/trunk/xdocs/usermanual/component_reference.xml Wed Feb 24 
23:44:35 2010
@@ -309,8 +309,8 @@
  pSee jmeter.properties file for the details of the settings. 
  If the HTTPResponse.parser property is not set, JMeter reverts to the 
previous behaviour,
  i.e. only text/html responses will be scanned/p
-bEmulating slow connections:/bbr/br
-The HttpClient sampler supports emulation of slow connections; see the 
following entries in jmeter.proerties:
+bEmulating slow connections (HttpClient only):/bbr/br
+The HttpClient version of the sampler supports emulation of slow connections; 
see the following entries in jmeter.proerties:
 pre
 # Define characters per second  0 to emulate slow connections
 #httpclient.socket.http.cps=0



-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



svn commit: r916067 - in /jakarta/jmeter/trunk/src: jorphan/org/apache/jorphan/gui/GuiUtils.java protocol/http/org/apache/jmeter/protocol/http/gui/HTTPArgumentsPanel.java protocol/http/org/apache/jmet

2010-02-24 Thread sebb
Author: sebb
Date: Thu Feb 25 00:55:27 2010
New Revision: 916067

URL: http://svn.apache.org/viewvc?rev=916067view=rev
Log:
Better implementation of fixsize() for table columns

Modified:
jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/gui/GuiUtils.java

jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/HTTPArgumentsPanel.java

jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/HTTPFileArgsPanel.java

Modified: jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/gui/GuiUtils.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/gui/GuiUtils.java?rev=916067r1=916066r2=916067view=diff
==
--- jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/gui/GuiUtils.java 
(original)
+++ jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/gui/GuiUtils.java Thu 
Feb 25 00:55:27 2010
@@ -21,6 +21,9 @@
 import java.awt.Component;
 
 import javax.swing.JScrollPane;
+import javax.swing.JTable;
+import javax.swing.table.TableCellRenderer;
+import javax.swing.table.TableColumn;
 
 public class GuiUtils {
 
@@ -42,4 +45,23 @@
 return pane;
 }
 
+/**
+ * Fix the size of a column according to the header text.
+ * 
+ * @param column to be resized
+ * @param table containing the column
+ */
+public static void fixSize(TableColumn column, JTable table) {
+TableCellRenderer rndr;
+rndr = column.getHeaderRenderer();
+if (rndr == null){
+rndr = table.getTableHeader().getDefaultRenderer();
+}
+Component c = rndr.getTableCellRendererComponent(
+table, column.getHeaderValue(), false, false, -1, 
column.getModelIndex());
+int width = c.getPreferredSize().width+10;
+column.setMaxWidth(width);
+column.setPreferredWidth(width);
+column.setResizable(false);
+}
 }

Modified: 
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/HTTPArgumentsPanel.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/HTTPArgumentsPanel.java?rev=916067r1=916066r2=916067view=diff
==
--- 
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/HTTPArgumentsPanel.java
 (original)
+++ 
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/HTTPArgumentsPanel.java
 Thu Feb 25 00:55:27 2010
@@ -21,7 +21,6 @@
 import java.util.Iterator;
 
 import javax.swing.JTable;
-import javax.swing.table.TableColumn;
 
 import org.apache.jmeter.config.Arguments;
 import org.apache.jmeter.config.gui.ArgumentsPanel;
@@ -29,6 +28,7 @@
 import org.apache.jmeter.testelement.TestElement;
 import org.apache.jmeter.testelement.property.PropertyIterator;
 import org.apache.jmeter.util.JMeterUtils;
+import org.apache.jorphan.gui.GuiUtils;
 import org.apache.jorphan.gui.ObjectTableModel;
 import org.apache.jorphan.reflect.Functor;
 
@@ -71,11 +71,8 @@
 
 @Override
 protected void sizeColumns(JTable table) {
-int resizeMode = table.getAutoResizeMode();
-table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
-fixSize(table.getColumn(INCLUDE_EQUALS));
-fixSize(table.getColumn(ENCODE_OR_NOT));
-table.setAutoResizeMode(resizeMode);
+GuiUtils.fixSize(table.getColumn(INCLUDE_EQUALS), table);
+GuiUtils.fixSize(table.getColumn(ENCODE_OR_NOT), table);
 }
 
 @Override
@@ -86,14 +83,6 @@
 return arg;
 }
 
-private void fixSize(TableColumn column) {
-column.sizeWidthToFit();
-// column.setMinWidth(column.getWidth());
-column.setMaxWidth((int) (column.getWidth() * 1.5));
-column.setWidth(column.getMaxWidth());
-column.setResizable(false);
-}
-
 public HTTPArgumentsPanel() {
 super(JMeterUtils.getResString(paramtable)); //$NON-NLS-1$
 }

Modified: 
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/HTTPFileArgsPanel.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/HTTPFileArgsPanel.java?rev=916067r1=916066r2=916067view=diff
==
--- 
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/HTTPFileArgsPanel.java
 (original)
+++ 
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/HTTPFileArgsPanel.java
 Thu Feb 25 00:55:27 2010
@@ -36,7 +36,6 @@
 import javax.swing.JTable;
 import javax.swing.ListSelectionModel;
 import javax.swing.table.TableCellEditor;
-import javax.swing.table.TableColumn;
 
 import org.apache.jmeter.gui.util.FileDialoger;
 import org.apache.jmeter.gui.util.HeaderAsPropertyRenderer;
@@ -44,6 +43,7 @@
 import

svn commit: r915382 - in /jakarta/jmeter/trunk: src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/MailFileFolder.java src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/MailFileStore.ja

2010-02-23 Thread sebb
Author: sebb
Date: Tue Feb 23 15:23:27 2010
New Revision: 915382

URL: http://svn.apache.org/viewvc?rev=915382view=rev
Log:
Implement reading mail from a single file

Modified:

jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/MailFileFolder.java

jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/MailFileStore.java
jakarta/jmeter/trunk/xdocs/usermanual/component_reference.xml

Modified: 
jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/MailFileFolder.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/MailFileFolder.java?rev=915382r1=915381r2=915382view=diff
==
--- 
jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/MailFileFolder.java
 (original)
+++ 
jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/MailFileFolder.java
 Tue Feb 23 15:23:27 2010
@@ -37,7 +37,8 @@
 private static final String FILENAME_FORMAT = %d.msg;
 private static final String FILENAME_REGEX = \\d+\\.msg;
 private boolean isOpen;
-private final File folderPath;
+private final File folderPath;// Parent folder (or single message file)
+private final boolean isFile;
 private static final FilenameFilter FILENAME_FILTER = new FilenameFilter(){
 public boolean accept(File dir, String name) {
 return name.matches(FILENAME_REGEX);
@@ -48,7 +49,13 @@
 public MailFileFolder(Store store, String path) {
 super(store);
 String base = store.getURLName().getHost(); // == ServerName from mail 
sampler
-folderPath = new File(base,path);
+File parentFolder = new File(base);
+isFile = parentFolder.isFile();
+if (isFile){
+folderPath = new File(base);
+} else {
+folderPath = new File(base,path);
+}
 }
 
 public MailFileFolder(Store store, URLName path) {
@@ -98,7 +105,12 @@
 
 @Override
 public Message getMessage(int index) throws MessagingException {
-File f = new File(folderPath,String.format(FILENAME_FORMAT, 
Integer.valueOf(index)));
+File f;
+if (isFile) {
+f = folderPath;
+} else {
+f = new File(folderPath,String.format(FILENAME_FORMAT, 
Integer.valueOf(index)));
+}
 try {
 FileInputStream fis = new FileInputStream(f);
 try {
@@ -115,6 +127,7 @@
 @Override
 public int getMessageCount() throws MessagingException {
 if (!isOpen) return -1;
+if (isFile) return 1;
 File[] listFiles = folderPath.listFiles(FILENAME_FILTER);
 return listFiles != null ? listFiles.length : 0;
 }

Modified: 
jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/MailFileStore.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/MailFileStore.java?rev=915382r1=915381r2=915382view=diff
==
--- 
jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/MailFileStore.java
 (original)
+++ 
jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/MailFileStore.java
 Tue Feb 23 15:23:27 2010
@@ -18,6 +18,8 @@
 
 package org.apache.jmeter.protocol.mail.sampler;
 
+import java.io.File;
+
 import javax.mail.Folder;
 import javax.mail.MessagingException;
 import javax.mail.Session;
@@ -31,8 +33,13 @@
 }
 
 @Override
-protected boolean protocolConnect(String host, int port, String user, 
String password){
-return true;
+protected boolean protocolConnect(String host, int port, String user, 
String password)
+throws MessagingException {
+File base = new File(host);
+if (base.isDirectory() || base.isFile()) {
+return true;
+}
+throw new MessagingException(Host must be a valid directory or file);
 }
 
 @Override

Modified: jakarta/jmeter/trunk/xdocs/usermanual/component_reference.xml
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/xdocs/usermanual/component_reference.xml?rev=915382r1=915381r2=915382view=diff
==
--- jakarta/jmeter/trunk/xdocs/usermanual/component_reference.xml (original)
+++ jakarta/jmeter/trunk/xdocs/usermanual/component_reference.xml Tue Feb 23 
15:23:27 2010
@@ -1331,11 +1331,11 @@
 For example codefile/code for use with the read-only mail file provider.
 The actual provider names for POP3 and IMAP are codepop3/code and 
codeimap/code
 /property
-property name=Server required=YesHostname or IP address of the 
server/property
+property name=Server required=YesHostname or IP address of the server. 
See below

svn commit: r915408 - in /jakarta/jmeter/trunk: src/core/org/apache/jmeter/engine/StandardJMeterEngine.java xdocs/changes.xml

2010-02-23 Thread sebb
Author: sebb
Date: Tue Feb 23 16:19:22 2010
New Revision: 915408

URL: http://svn.apache.org/viewvc?rev=915408view=rev
Log:
Bug 48786 - Run Thread groups consecutively: with Stop test now on error or 
manual stop, JMeter leaves the green box active

Modified:

jakarta/jmeter/trunk/src/core/org/apache/jmeter/engine/StandardJMeterEngine.java
jakarta/jmeter/trunk/xdocs/changes.xml

Modified: 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/engine/StandardJMeterEngine.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/engine/StandardJMeterEngine.java?rev=915408r1=915407r2=915408view=diff
==
--- 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/engine/StandardJMeterEngine.java
 (original)
+++ 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/engine/StandardJMeterEngine.java
 Tue Feb 23 16:19:22 2010
@@ -352,12 +352,12 @@
 public void run() {
 running = false;
 engine = null;
+boolean stopped = false;
 if (now) {
 tellThreadsToStop();
 pause(10 * allThreads.size());
-boolean stopped = verifyThreadsStopped();
+stopped = verifyThreadsStopped();
 if (!stopped) {
-notifyTestListenersOfEnd(testListenersSave);
 if (JMeter.isNonGUI()) {
 exit();
 } else {
@@ -369,9 +369,10 @@
 } // else will be done by threadFinished()
 } else {
 stopAllThreads();
-if (serialized) {
-notifyTestListenersOfEnd(testListenersSave);
-}
+}
+//  for TGs which run consecutively or when thread don't stop 
+if (serialized || !stopped) {
+notifyTestListenersOfEnd(testListenersSave);
 }
 }
 }

Modified: jakarta/jmeter/trunk/xdocs/changes.xml
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/xdocs/changes.xml?rev=915408r1=915407r2=915408view=diff
==
--- jakarta/jmeter/trunk/xdocs/changes.xml (original)
+++ jakarta/jmeter/trunk/xdocs/changes.xml Tue Feb 23 16:19:22 2010
@@ -104,6 +104,7 @@
 liBug 47385 - TransactionController should set AllThreads and 
GroupThreads/li
 liBug 47940 - Module controller incorrectly creates the replacement Sub 
Tree/li
 liBug 47592 - Run Thread groups consecutively with Stop test on error, 
JMeter will not mark to finished/li
+liBug 48786 - Run Thread groups consecutively: with Stop test now on error 
or manual stop, JMeter leaves the green box active/li
 /ul
 
 h3Listeners/h3



-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



svn commit: r915421 - in /jakarta/jmeter/trunk: src/core/org/apache/jmeter/engine/StandardJMeterEngine.java xdocs/changes.xml

2010-02-23 Thread sebb
Author: sebb
Date: Tue Feb 23 16:39:03 2010
New Revision: 915421

URL: http://svn.apache.org/viewvc?rev=915421view=rev
Log:
Bug 48727 - Cannot stop test if all thread groups are disabled

Modified:

jakarta/jmeter/trunk/src/core/org/apache/jmeter/engine/StandardJMeterEngine.java
jakarta/jmeter/trunk/xdocs/changes.xml

Modified: 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/engine/StandardJMeterEngine.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/engine/StandardJMeterEngine.java?rev=915421r1=915420r2=915421view=diff
==
--- 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/engine/StandardJMeterEngine.java
 (original)
+++ 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/engine/StandardJMeterEngine.java
 Tue Feb 23 16:39:03 2010
@@ -496,12 +496,17 @@
 }
 }
 } // end of thread groups
-if (running) {
-log.info(All threads have been started);
+startingGroups = false;
+if (groupCount == 0){ // No TGs found
+log.info(No enabled thread groups found);
+notifyTestListenersOfEnd(testListenersSave);
 } else {
-log.info(Test stopped - no more threads will be started);
+if (running) {
+log.info(All threads have been started);
+} else {
+log.info(Test stopped - no more threads will be started);
+}
 }
-startingGroups = false;
 }
 
 /**

Modified: jakarta/jmeter/trunk/xdocs/changes.xml
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/xdocs/changes.xml?rev=915421r1=915420r2=915421view=diff
==
--- jakarta/jmeter/trunk/xdocs/changes.xml (original)
+++ jakarta/jmeter/trunk/xdocs/changes.xml Tue Feb 23 16:39:03 2010
@@ -105,6 +105,7 @@
 liBug 47940 - Module controller incorrectly creates the replacement Sub 
Tree/li
 liBug 47592 - Run Thread groups consecutively with Stop test on error, 
JMeter will not mark to finished/li
 liBug 48786 - Run Thread groups consecutively: with Stop test now on error 
or manual stop, JMeter leaves the green box active/li
+liBug 48727 - Cannot stop test if all thread groups are disabled/li
 /ul
 
 h3Listeners/h3



-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



svn commit: r915585 - /jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/gui/ProxyControlGui.java

2010-02-23 Thread sebb
Author: sebb
Date: Tue Feb 23 23:21:23 2010
New Revision: 915585

URL: http://svn.apache.org/viewvc?rev=915585view=rev
Log:
Unnecessary override

Modified:

jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/gui/ProxyControlGui.java

Modified: 
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/gui/ProxyControlGui.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/gui/ProxyControlGui.java?rev=915585r1=915584r2=915585view=diff
==
--- 
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/gui/ProxyControlGui.java
 (original)
+++ 
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/gui/ProxyControlGui.java
 Tue Feb 23 23:21:23 2010
@@ -797,9 +797,6 @@
 return spaces.toString();
 }
 
-public void setNode(JMeterTreeNode node) {
-getNamePanel().setNode(node);
-}
 }
 
 class TreeNodeWrapper {



-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



svn commit: r915587 - in /jakarta/jmeter/trunk: src/components/org/apache/jmeter/control/gui/ src/components/org/apache/jmeter/timers/ src/core/org/apache/jmeter/control/gui/ src/core/org/apache/jmete

2010-02-23 Thread sebb
Author: sebb
Date: Tue Feb 23 23:24:29 2010
New Revision: 915587

URL: http://svn.apache.org/viewvc?rev=915587view=rev
Log:
Bug 48749 - Allowing custom Thread Groups

Added:

jakarta/jmeter/trunk/src/core/org/apache/jmeter/threads/AbstractThreadGroup.java
   (with props)

jakarta/jmeter/trunk/src/core/org/apache/jmeter/threads/gui/AbstractThreadGroupGui.java
   (with props)
Modified:

jakarta/jmeter/trunk/src/components/org/apache/jmeter/control/gui/ModuleControllerGui.java

jakarta/jmeter/trunk/src/components/org/apache/jmeter/timers/ConstantThroughputTimer.java
jakarta/jmeter/trunk/src/core/org/apache/jmeter/control/gui/TestPlanGui.java
jakarta/jmeter/trunk/src/core/org/apache/jmeter/engine/ConvertListeners.java

jakarta/jmeter/trunk/src/core/org/apache/jmeter/engine/StandardJMeterEngine.java
jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/util/MenuFactory.java

jakarta/jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties
jakarta/jmeter/trunk/src/core/org/apache/jmeter/testelement/TestPlan.java
jakarta/jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterContext.java
jakarta/jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterThread.java
jakarta/jmeter/trunk/src/core/org/apache/jmeter/threads/ThreadGroup.java

jakarta/jmeter/trunk/src/core/org/apache/jmeter/threads/gui/ThreadGroupGui.java

jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/ProxyControl.java

jakarta/jmeter/trunk/src/reports/org/apache/jmeter/testelement/ReportPlan.java
jakarta/jmeter/trunk/xdocs/changes.xml

Modified: 
jakarta/jmeter/trunk/src/components/org/apache/jmeter/control/gui/ModuleControllerGui.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/components/org/apache/jmeter/control/gui/ModuleControllerGui.java?rev=915587r1=915586r2=915587view=diff
==
--- 
jakarta/jmeter/trunk/src/components/org/apache/jmeter/control/gui/ModuleControllerGui.java
 (original)
+++ 
jakarta/jmeter/trunk/src/components/org/apache/jmeter/control/gui/ModuleControllerGui.java
 Tue Feb 23 23:24:29 2010
@@ -38,7 +38,7 @@
 import org.apache.jmeter.testelement.TestElement;
 import org.apache.jmeter.testelement.TestPlan;
 import org.apache.jmeter.testelement.WorkBench;
-import org.apache.jmeter.threads.ThreadGroup;
+import org.apache.jmeter.threads.AbstractThreadGroup;
 import org.apache.jmeter.util.JMeterUtils;
 import org.apache.jorphan.gui.layout.VerticalLayout;
 
@@ -205,7 +205,7 @@
 StringBuilder name = new StringBuilder();
 JMeterTreeNode cur = (JMeterTreeNode) node.getChildAt(i);
 TestElement te = cur.getTestElement();
-if (te instanceof ThreadGroup) {
+if (te instanceof AbstractThreadGroup) {
 name.append(parent_name);
 name.append(cur.getName());
 name.append(seperator);

Modified: 
jakarta/jmeter/trunk/src/components/org/apache/jmeter/timers/ConstantThroughputTimer.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/components/org/apache/jmeter/timers/ConstantThroughputTimer.java?rev=915587r1=915586r2=915587view=diff
==
--- 
jakarta/jmeter/trunk/src/components/org/apache/jmeter/timers/ConstantThroughputTimer.java
 (original)
+++ 
jakarta/jmeter/trunk/src/components/org/apache/jmeter/timers/ConstantThroughputTimer.java
 Tue Feb 23 23:24:29 2010
@@ -26,7 +26,7 @@
 import org.apache.jmeter.testelement.AbstractTestElement;
 import org.apache.jmeter.testelement.TestListener;
 import org.apache.jmeter.threads.JMeterContextService;
-import org.apache.jmeter.threads.ThreadGroup;
+import org.apache.jmeter.threads.AbstractThreadGroup;
 import org.apache.jmeter.util.JMeterUtils;
 import org.apache.jorphan.logging.LoggingManager;
 import org.apache.log.Logger;
@@ -70,9 +70,9 @@
 //For calculating throughput across all threads
 private final static ThroughputInfo allThreadsInfo = new ThroughputInfo();
 
-//For holding the ThrougputInfo objects for all ThreadGroups. Keyed by 
ThreadGroup objects
-private final static MapThreadGroup, ThroughputInfo threadGroupsInfoMap =
-new ConcurrentHashMapThreadGroup, ThroughputInfo();
+//For holding the ThrougputInfo objects for all ThreadGroups. Keyed by 
AbstractThreadGroup objects
+private final static MapAbstractThreadGroup, ThroughputInfo 
threadGroupsInfoMap =
+new ConcurrentHashMapAbstractThreadGroup, ThroughputInfo();
 
 
 /**
@@ -165,7 +165,7 @@
 break;
 
 case 4: //All threads in this group - alternate calculation
-final org.apache.jmeter.threads.ThreadGroup group =
+final org.apache.jmeter.threads.AbstractThreadGroup group =
 JMeterContextService.getContext().getThreadGroup

svn commit: r915596 - in /jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui: AbstractJMeterGuiComponent.java JMeterGUIComponent.java NamePanel.java

2010-02-23 Thread sebb
Author: sebb
Date: Tue Feb 23 23:55:42 2010
New Revision: 915596

URL: http://svn.apache.org/viewvc?rev=915596view=rev
Log:
[gs]etNode() are not used

Modified:

jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/AbstractJMeterGuiComponent.java
jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/JMeterGUIComponent.java
jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/NamePanel.java

Modified: 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/AbstractJMeterGuiComponent.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/AbstractJMeterGuiComponent.java?rev=915596r1=915595r2=915596view=diff
==
--- 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/AbstractJMeterGuiComponent.java
 (original)
+++ 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/AbstractJMeterGuiComponent.java
 Tue Feb 23 23:55:42 2010
@@ -28,7 +28,6 @@
 import javax.swing.JPanel;
 import javax.swing.JScrollPane;
 import javax.swing.border.Border;
-import javax.swing.tree.TreeNode;
 
 import org.apache.jmeter.gui.util.VerticalPanel;
 import org.apache.jmeter.testelement.TestElement;
@@ -65,9 +64,6 @@
 /** Flag indicating whether or not this component is enabled. */
 private boolean enabled = true;
 
-/** The tree node which this component is associated with. */
-private TreeNode node;
-
 /** A GUI panel containing the name of this component. */
 protected NamePanel namePanel;
 // used by AbstractReportGui
@@ -242,23 +238,6 @@
 }
 
 /**
- * Provides a default implementation for the node property. It is unlikely
- * developers would need to override this method.
- */
-public void setNode(TreeNode node) {
-this.node = node;
-getNamePanel().setNode(node);
-}
-
-/**
- * Provides a default implementation for the node property. It is unlikely
- * developers would need to override this method.
- */
-protected TreeNode getNode() {
-return node;
-}
-
-/**
  * Create a standard title section for JMeter components. This includes the
  * title for the component and the Name Panel allowing the user to change
  * the name for the component. This method is typically added to the top of

Modified: 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/JMeterGUIComponent.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/JMeterGUIComponent.java?rev=915596r1=915595r2=915596view=diff
==
--- jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/JMeterGUIComponent.java 
(original)
+++ jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/JMeterGUIComponent.java 
Tue Feb 23 23:55:42 2010
@@ -22,7 +22,6 @@
 
 import javax.swing.JPopupMenu;
 
-import javax.swing.tree.TreeNode;
 import org.apache.jmeter.testelement.TestElement;
 
 /**
@@ -179,14 +178,6 @@
 CollectionString getMenuCategories();
 
 /**
- * Sets the tree node which this component is associated with.
- *
- * @param node
- *the tree node corresponding to this component
- */
-void setNode(TreeNode node);
-
-/**
  * Clear the gui and return it to initial default values. This is necessary
  * because most gui classes are instantiated just once and re-used for
  * multiple test element objects and thus they need to be cleared between

Modified: jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/NamePanel.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/NamePanel.java?rev=915596r1=915595r2=915596view=diff
==
--- jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/NamePanel.java 
(original)
+++ jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/NamePanel.java Tue Feb 
23 23:55:42 2010
@@ -25,11 +25,7 @@
 import javax.swing.JPanel;
 import javax.swing.JPopupMenu;
 import javax.swing.JTextField;
-import javax.swing.event.DocumentEvent;
-import javax.swing.event.DocumentListener;
-import javax.swing.tree.TreeNode;
 
-import org.apache.jmeter.gui.tree.NamedTreeNode;
 import org.apache.jmeter.testelement.TestElement;
 import org.apache.jmeter.testelement.WorkBench;
 import org.apache.jmeter.testelement.property.StringProperty;
@@ -44,10 +40,7 @@
 /** The label for the text field. */
 private JLabel nameLabel;
 
-/** The node which this component is providing the name for. */
-private TreeNode node;
-
-/**
+   /**
  * Create a new NamePanel with the default name.
  */
 public NamePanel() {
@@ -65,20 +58,6 @@
 nameLabel.setName(name);
 nameLabel.setLabelFor(nameField);
 
-nameField.getDocument().addDocumentListener(new DocumentListener() {
-public void insertUpdate(DocumentEvent e) {
-updateName

svn commit: r915029 - /jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/MailReaderSampler.java

2010-02-22 Thread sebb
Author: sebb
Date: Mon Feb 22 19:31:29 2010
New Revision: 915029

URL: http://svn.apache.org/viewvc?rev=915029view=rev
Log:
Always default the encoding
Allow for nested MimeMultipart message parts
Don't include '@' in toString() if user name was not provided

Modified:

jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/MailReaderSampler.java

Modified: 
jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/MailReaderSampler.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/MailReaderSampler.java?rev=915029r1=915028r2=915029view=diff
==
--- 
jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/MailReaderSampler.java
 (original)
+++ 
jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/MailReaderSampler.java
 Mon Feb 22 19:31:29 2010
@@ -68,6 +68,8 @@
 private final static String STORE_MIME_MESSAGE = storeMimeMessage;
 //-
 
+private static final String RFC_822_DEFAULT_ENCODING = iso-8859-1; // 
RFC 822 uses ascii per default
+
 public static final String DEFAULT_PROTOCOL = pop3;  // $NON-NLS-1$
 
 public static final int ALL_MESSAGES = -1; // special value
@@ -148,6 +150,8 @@
 
 final String contentType = message.getContentType();
 child.setContentType(contentType);// Store the content-type
+child.setDataEncoding(RFC_822_DEFAULT_ENCODING); // RFC 822 
uses ascii per default
+child.setEncodingAndType(contentType);// Parse the content-type
 
 if (isStoreMimeMessage()) {
 // Don't save headers - they are already in the raw message
@@ -155,10 +159,7 @@
 message.writeTo(bout);
 child.setResponseData(bout.toByteArray()); // Save raw 
message
 child.setDataType(SampleResult.TEXT);
-child.setDataEncoding(iso-8859-1); // RFC 822 uses ascii
-child.setEncodingAndType(contentType);// Parse the 
content-type
 } else {
-child.setEncodingAndType(contentType);// Parse the 
content-type
 @SuppressWarnings(unchecked) // Javadoc for the API says 
this is OK
 EnumerationHeader hdrs = message.getAllHeaders();
 while(hdrs.hasMoreElements()){
@@ -250,38 +251,45 @@
 cdata.append(NEW_LINE);
 Object content = message.getContent();
 if (content instanceof MimeMultipart) {
-MimeMultipart mmp = (MimeMultipart) content;
-String preamble = mmp.getPreamble();
-if (preamble != null ){
-cdata.append(preamble);
-}
-
child.setResponseData(cdata.toString(),child.getDataEncodingNoDefault());
-int count = mmp.getCount();
-for (int j=0; jcount;j++){
-BodyPart bodyPart = mmp.getBodyPart(j);
-final Object bodyPartContent = bodyPart.getContent();
-final String contentType = bodyPart.getContentType();
-SampleResult sr = new SampleResult();
-sr.setSampleLabel(Part: +j);
-sr.setContentType(contentType);
-sr.setEncodingAndType(contentType);
-sr.sampleStart();
-if (bodyPartContent instanceof InputStream){
-sr.setResponseData(IOUtils.toByteArray((InputStream) 
bodyPartContent));
-} else {
-
sr.setResponseData(bodyPartContent.toString(),sr.getDataEncodingNoDefault());
-}
-sr.setResponseOK();
-sr.sampleEnd();
-child.addSubResult(sr);
-}
+appendMultiPart(child, cdata, (MimeMultipart) content);
+} else if (content instanceof InputStream){
+child.setResponseData(IOUtils.toByteArray((InputStream) content));
 } else {
-if (content instanceof InputStream){
-child.setResponseData(IOUtils.toByteArray((InputStream) 
content));
+cdata.append(content);
+
child.setResponseData(cdata.toString(),child.getDataEncodingNoDefault());
+}
+}
+
+private void appendMultiPart(SampleResult child, StringBuilder cdata,
+MimeMultipart mmp) throws MessagingException, IOException {
+String preamble = mmp.getPreamble();
+if (preamble != null ){
+cdata.append(preamble);
+}
+
child.setResponseData(cdata.toString(),child.getDataEncodingNoDefault());
+int count = mmp.getCount();
+for (int j=0; jcount;j++){
+BodyPart bodyPart = mmp.getBodyPart(j);
+final Object bodyPartContent = bodyPart.getContent();
+final String

Re: Behavior of Enable/Disable

2010-02-22 Thread sebb
On 22/02/2010, Patrick Radtke prad...@nulli.com wrote:
 Hi All,

  We found that the current behavior of enable/disable to not be what we
  desire when using the tool.
  The current behavior is to just enable/disable the selected component,
  while in our use we found we always wanted to enable/disable the
  current component and all sub components.

Not sure I follow why there is a problem.

If you disable a Controller, then it does not run, and neither do any
of its sub-components.

If you disable a Sampler, then any subcomponents such as Listeners and
Assertions won't run.

So I don't follow how the proposed changes will help.

  We would like to contribute this patch back.
  I can thing of the following ways to integrate this back in:
  1. Replace the current behavior with the new behavior.
  2. Add  two more menu items 'Enable Subtree'/'Disable Subtree' to the
  component's contextual menu.
  3. Create two sub menus called 'Enable' and 'Disable' and within each
  of those have a menu item for the current behavior and the new
  behavior.

  Anyone have any thoughts of which of the 3 is best? Doing #2 or #3
  would require localizing the new menu item text into other languages.

  -Patrick

  -
  To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
  For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



svn commit: r915148 - /jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/util/VerticalPanel.java

2010-02-22 Thread sebb
Author: sebb
Date: Tue Feb 23 02:53:59 2010
New Revision: 915148

URL: http://svn.apache.org/viewvc?rev=915148view=rev
Log:
Make fields final

Modified:
jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/util/VerticalPanel.java

Modified: 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/util/VerticalPanel.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/util/VerticalPanel.java?rev=915148r1=915147r2=915148view=diff
==
--- jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/util/VerticalPanel.java 
(original)
+++ jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/util/VerticalPanel.java 
Tue Feb 23 02:53:59 2010
@@ -35,11 +35,11 @@
 public class VerticalPanel extends JPanel {
 private static final long serialVersionUID = 240L;
 
-private Box subPanel = Box.createVerticalBox();
+private final Box subPanel = Box.createVerticalBox();
 
-private float horizontalAlign;
+private final float horizontalAlign;
 
-private int vgap;
+private final int vgap;
 
 public VerticalPanel() {
 this(5, LEFT_ALIGNMENT);



-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



Re: [PATCH] Adding connect time and processing time

2010-02-21 Thread sebb
If you want the patch to be considered for inclusion in Jmeter, please
create a Bugzilla enhancement issue and attach the patch to that.

Thanks!

On 21/02/2010, Pieter Ennes pie...@watchmouse.com wrote:
 Hi all,

  I'm sending a small patch that mainly adds a connect time measurement
  to the HTTP and SOAP samplers. Also included, but disabled by default,
  is a 'processing' time that just sums the already existing latency
  times into the parent sampler.

  The diff is available here:
  http://labs.watchmouse.com/wp-content/uploads/jmeter-ctime-ptime.diff_.txt

  I'm looking forward to your comments, and am willing to look into
  adding the same for other samplers where appropriate. Also I plan to
  add a resolve time measurement, but this seemed to need some code in
  deeper classes (tips very welcome!).

  Cheers,
  Pieter

  -
  To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
  For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



svn commit: r910946 - in /jakarta/jmeter/trunk/bin: jmeter-n-r.cmd jmeter-n.cmd jmeter-t.cmd

2010-02-17 Thread sebb
Author: sebb
Date: Wed Feb 17 12:19:41 2010
New Revision: 910946

URL: http://svn.apache.org/viewvc?rev=910946view=rev
Log:
Allow for spaces in the file name

Modified:
jakarta/jmeter/trunk/bin/jmeter-n-r.cmd
jakarta/jmeter/trunk/bin/jmeter-n.cmd
jakarta/jmeter/trunk/bin/jmeter-t.cmd

Modified: jakarta/jmeter/trunk/bin/jmeter-n-r.cmd
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/bin/jmeter-n-r.cmd?rev=910946r1=910945r2=910946view=diff
==
--- jakarta/jmeter/trunk/bin/jmeter-n-r.cmd (original)
+++ jakarta/jmeter/trunk/bin/jmeter-n-r.cmd Wed Feb 17 12:19:41 2010
@@ -38,10 +38,10 @@
 if a == a%1 goto winNT2
 
 rem Allow special name LAST
-if aLAST == a%1 goto winNT3
+if LAST == %1 goto winNT3
 
 rem Check it has extension .jmx
-if a%~x1 == a.jmx goto winNT3
+if %~x1 == .jmx goto winNT3
 :winNT2
 echo Please supply a script name with the extension .jmx
 pause

Modified: jakarta/jmeter/trunk/bin/jmeter-n.cmd
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/bin/jmeter-n.cmd?rev=910946r1=910945r2=910946view=diff
==
--- jakarta/jmeter/trunk/bin/jmeter-n.cmd (original)
+++ jakarta/jmeter/trunk/bin/jmeter-n.cmd Wed Feb 17 12:19:41 2010
@@ -38,10 +38,10 @@
 if a == a%1 goto winNT2
 
 rem Allow special name LAST
-if aLAST == a%1 goto winNT3
+if LAST == %1 goto winNT3
 
 rem Check it has extension .jmx
-if a%~x1 == a.jmx goto winNT3
+if %~x1 == .jmx goto winNT3
 :winNT2
 echo Please supply a script name with the extension .jmx
 pause

Modified: jakarta/jmeter/trunk/bin/jmeter-t.cmd
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/bin/jmeter-t.cmd?rev=910946r1=910945r2=910946view=diff
==
--- jakarta/jmeter/trunk/bin/jmeter-t.cmd (original)
+++ jakarta/jmeter/trunk/bin/jmeter-t.cmd Wed Feb 17 12:19:41 2010
@@ -36,10 +36,10 @@
 if a == a%1 goto winNT2
 
 rem Allow special name LAST
-if aLAST == a%1 goto winNT3
+if LAST == %1 goto winNT3
 
 rem Check it has extension .jmx
-if a%~x1 == a.jmx goto winNT3
+if %~x1 == .jmx goto winNT3
 :winNT2
 echo Please supply a script name with the extension .jmx
 pause



-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



svn commit: r911021 - /jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/MailReaderSampler.java

2010-02-17 Thread sebb
Author: sebb
Date: Wed Feb 17 15:34:24 2010
New Revision: 911021

URL: http://svn.apache.org/viewvc?rev=911021view=rev
Log:
Initial implementation of interruptible

Modified:

jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/MailReaderSampler.java

Modified: 
jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/MailReaderSampler.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/MailReaderSampler.java?rev=911021r1=911020r2=911021view=diff
==
--- 
jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/MailReaderSampler.java
 (original)
+++ 
jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/MailReaderSampler.java
 Wed Feb 17 15:34:24 2010
@@ -39,6 +39,7 @@
 import org.apache.commons.io.IOUtils;
 import org.apache.jmeter.samplers.AbstractSampler;
 import org.apache.jmeter.samplers.Entry;
+import org.apache.jmeter.samplers.Interruptible;
 import org.apache.jmeter.samplers.SampleResult;
 import org.apache.jmeter.testelement.property.BooleanProperty;
 import org.apache.jmeter.testelement.property.IntegerProperty;
@@ -49,7 +50,7 @@
 /**
  * Sampler that can read from POP3 and IMAP mail servers
  */
-public class MailReaderSampler extends AbstractSampler {
+public class MailReaderSampler extends AbstractSampler implements 
Interruptible {
 private static final Logger log = LoggingManager.getLoggerForClass();
 
 private static final long serialVersionUID = 240L;
@@ -75,6 +76,8 @@
 
 public static final int ALL_MESSAGES = -1; // special value
 
+private volatile boolean busy;
+
 public MailReaderSampler() {
 setServerType(TYPE_POP3);
 setFolder(INBOX);
@@ -134,7 +137,8 @@
 
 parent.setSampleCount(n); // TODO is this sensible?
 
-for (int i = 0; i  n; i++) {
+busy = true;
+for (int i = 0; busy  i  n; i++) {
 StringBuilder cdata = new StringBuilder();
 SampleResult child = new SampleResult();
 child.sampleStart();
@@ -205,6 +209,8 @@
 log.debug(, ex);// No need to log normally, as we set the status
 parent.setResponseCode(500); // $NON-NLS-1$
 parent.setResponseMessage(ex.toString());
+} finally {
+busy = false;
 }
 
 if (parent.getEndTime()==0){// not been set by any child samples
@@ -462,4 +468,13 @@
 sb.append(]);
 return sb.toString();
 }
+
+/**
+ * {...@inheritdoc}
+ */
+public boolean interrupt() {
+boolean wasbusy = busy;
+busy = false;
+return wasbusy;
+}
 }



-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



svn commit: r911118 - in /jakarta/jmeter/trunk: src/core/org/apache/jmeter/resources/ src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/ src/protocol/mail/org/apache/jmeter/protocol/mail/sampl

2010-02-17 Thread sebb
Author: sebb
Date: Wed Feb 17 17:55:07 2010
New Revision: 98

URL: http://svn.apache.org/viewvc?rev=98view=rev
Log:
Replace ComboBox with JTextField
TODO: New screen layout needs to be fixed.

Modified:

jakarta/jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties

jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/MailReaderSampler.java

jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/gui/MailReaderSamplerGui.java
jakarta/jmeter/trunk/xdocs/usermanual/component_reference.xml

Modified: 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties?rev=98r1=97r2=98view=diff
==
--- 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties 
(original)
+++ 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties 
Wed Feb 17 17:55:07 2010
@@ -458,15 +458,11 @@
 mail_reader_all_messages=All
 mail_reader_delete=Delete messages from the server
 mail_reader_folder=Folder:
-mail_reader_imap=IMAP
-mail_reader_imaps=IMAPS
 mail_reader_num_messages=Number of messages to retrieve:
 mail_reader_password=Password:
-mail_reader_pop3=POP3
-mail_reader_pop3s=POP3S
-mail_reader_port=Port (optional):
-mail_reader_server=Server:
-mail_reader_server_type=Server Type:
+mail_reader_port=Server Port (optional):
+mail_reader_server=Server Host:
+mail_reader_server_type=JavaMail Protocol (e.g. pop3, imaps):
 mail_reader_storemime=Store the message using MIME
 mail_reader_title=Mail Reader Sampler
 mail_sent=Mail sent successfully

Modified: 
jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/MailReaderSampler.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/MailReaderSampler.java?rev=98r1=97r2=98view=diff
==
--- 
jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/MailReaderSampler.java
 (original)
+++ 
jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/MailReaderSampler.java
 Wed Feb 17 17:55:07 2010
@@ -66,21 +66,17 @@
 private final static String NUM_MESSAGES = num_messages; // $NON-NLS-1$
 private static final String NEW_LINE = \n; // $NON-NLS-1$
 private final static String STORE_MIME_MESSAGE = storeMimeMessage;
-
-// Needed by GUI
-public final static String TYPE_POP3 = pop3; // $NON-NLS-1$
-public final static String TYPE_POP3S = pop3s; // $NON-NLS-1$
-public final static String TYPE_IMAP = imap; // $NON-NLS-1$
-public final static String TYPE_IMAPS = imaps; // $NON-NLS-1$
 //-
 
+public static final String DEFAULT_PROTOCOL = pop3;  // $NON-NLS-1$
+
 public static final int ALL_MESSAGES = -1; // special value
 
 private volatile boolean busy;
 
 public MailReaderSampler() {
-setServerType(TYPE_POP3);
-setFolder(INBOX);
+setServerType(DEFAULT_PROTOCOL);
+setFolder(INBOX);  // $NON-NLS-1$
 setNumMessages(ALL_MESSAGES);
 setDeleteMessages(false);
 }

Modified: 
jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/gui/MailReaderSamplerGui.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/gui/MailReaderSamplerGui.java?rev=98r1=97r2=98view=diff
==
--- 
jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/gui/MailReaderSamplerGui.java
 (original)
+++ 
jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/gui/MailReaderSamplerGui.java
 Wed Feb 17 17:55:07 2010
@@ -19,11 +19,11 @@
 
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
+import java.awt.event.FocusEvent;
+import java.awt.event.FocusListener;
 
 import javax.swing.ButtonGroup;
-import javax.swing.DefaultComboBoxModel;
 import javax.swing.JCheckBox;
-import javax.swing.JComboBox;
 import javax.swing.JLabel;
 import javax.swing.JPanel;
 import javax.swing.JRadioButton;
@@ -38,12 +38,12 @@
 import org.apache.jmeter.util.JMeterUtils;
 import org.apache.jorphan.gui.layout.VerticalLayout;
 
-public class MailReaderSamplerGui extends AbstractSamplerGui {
+public class MailReaderSamplerGui extends AbstractSamplerGui implements 
ActionListener, FocusListener {
 
 private static final long serialVersionUID = 240L;
 
 // Gui Components
-private JComboBox serverTypeBox;
+private JTextField serverTypeBox;
 
 private JTextField serverBox;
 
@@ -68,13 +68,6 @@
 private JCheckBox storeMimeMessageBox

svn commit: r910559 - in /jakarta/jmeter/trunk: src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPSampler.java xdocs/changes.xml

2010-02-16 Thread sebb
Author: sebb
Date: Tue Feb 16 15:21:18 2010
New Revision: 910559

URL: http://svn.apache.org/viewvc?rev=910559view=rev
Log:
Bug 48747 - TCP Sampler swallows exceptions

Modified:

jakarta/jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPSampler.java
jakarta/jmeter/trunk/xdocs/changes.xml

Modified: 
jakarta/jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPSampler.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPSampler.java?rev=910559r1=910558r2=910559view=diff
==
--- 
jakarta/jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPSampler.java
 (original)
+++ 
jakarta/jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPSampler.java
 Tue Feb 16 15:21:18 2010
@@ -337,6 +337,11 @@
 res.setResponseCode(500); //$NON-NLS-1$
 res.setResponseMessage(ex.toString());
 closeSocket();
+} catch (Exception ex) {
+log.error(, ex);
+isSuccessful=false;
+res.setResponseCode(500);
+res.setResponseMessage(ex.toString());
 } finally {
 // Calculate response time
 res.sampleEnd();

Modified: jakarta/jmeter/trunk/xdocs/changes.xml
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/xdocs/changes.xml?rev=910559r1=910558r2=910559view=diff
==
--- jakarta/jmeter/trunk/xdocs/changes.xml (original)
+++ jakarta/jmeter/trunk/xdocs/changes.xml Tue Feb 16 15:21:18 2010
@@ -96,6 +96,7 @@
 liBug 47992 - JMS Point-to-Point Request - Response option doesn't work/li
 liBug 48573 - LDAPExtSampler directory context handling/li
 liBug 48579 - Single Bind does not show config information when LdapExt 
Sampler is accessed/li
+liBug 48747 - TCP Sampler swallows exceptions/li
 /ul
 
 h3Controllers/h3



-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



svn commit: r910765 - /jakarta/jmeter/trunk/src/protocol/java/org/apache/jmeter/protocol/java/sampler/JSR223SamplerResources_fr.properties

2010-02-16 Thread sebb
Author: sebb
Date: Tue Feb 16 23:28:02 2010
New Revision: 910765

URL: http://svn.apache.org/viewvc?rev=910765view=rev
Log:
Bug 48714 - add new French messages

Added:

jakarta/jmeter/trunk/src/protocol/java/org/apache/jmeter/protocol/java/sampler/JSR223SamplerResources_fr.properties
   (with props)

Added: 
jakarta/jmeter/trunk/src/protocol/java/org/apache/jmeter/protocol/java/sampler/JSR223SamplerResources_fr.properties
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/protocol/java/org/apache/jmeter/protocol/java/sampler/JSR223SamplerResources_fr.properties?rev=910765view=auto
==
--- 
jakarta/jmeter/trunk/src/protocol/java/org/apache/jmeter/protocol/java/sampler/JSR223SamplerResources_fr.properties
 (added)
+++ 
jakarta/jmeter/trunk/src/protocol/java/org/apache/jmeter/protocol/java/sampler/JSR223SamplerResources_fr.properties
 Tue Feb 16 23:28:02 2010
@@ -0,0 +1,29 @@
+#   Licensed to the Apache Software Foundation (ASF) under one or more
+#   contributor license agreements.  See the NOTICE file distributed with
+#   this work for additional information regarding copyright ownership.
+#   The ASF licenses this file to You under the Apache License, Version 2.0
+#   (the License); you may not use this file except in compliance with
+#   the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+#   Unless required by applicable law or agreed to in writing, software
+#   distributed under the License is distributed on an AS IS BASIS,
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#   See the License for the specific language governing permissions and
+#   limitations under the License.
+
+#Stored by I18NEdit, may be edited!
+displayName=Echantillon JSR223
+filename.displayName=Nom de fichier
+filename.shortDescription=Fichier de script (remplace le script)
+filenameGroup.displayName=Fichier de script (remplace le script)
+parameterGroup.displayName=Param\u00E8tres \u00E0 passer au script (\= String 
Parameters and String []args)
+parameters.displayName=Param\u00E8tres 
+parameters.shortDescription=Param\u00E8tres \u00E0 passer au fichier ou au 
script
+script.displayName=Script 
+script.shortDescription=Script dans le langage JSR223 appropri\u00E9
+scriptLanguage.displayName=Langage 
+scriptLanguage.shortDescription=Nom du langage JSR223, i.e. beanshell, 
javascript, jexl, etc.
+scripting.displayName=Script (variables\: ctx vars props prev sampler log 
Label Filename Parameters args[] OUT)
+scriptingLanguage.displayName=Langage de script (i.e. groovy, beanshell, jexl, 
etc.)

Propchange: 
jakarta/jmeter/trunk/src/protocol/java/org/apache/jmeter/protocol/java/sampler/JSR223SamplerResources_fr.properties
--
svn:eol-style = native



-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



svn commit: r910798 - /jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleResult.java

2010-02-16 Thread sebb
Author: sebb
Date: Wed Feb 17 01:57:20 2010
New Revision: 910798

URL: http://svn.apache.org/viewvc?rev=910798view=rev
Log:
Add setResponse() shorthand method

Modified:
jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleResult.java

Modified: 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleResult.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleResult.java?rev=910798r1=910797r2=910798view=diff
==
--- jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleResult.java 
(original)
+++ jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleResult.java 
Wed Feb 17 01:57:20 2010
@@ -384,6 +384,20 @@
 responseMessage = OK_MSG;
 }
 
+/**
+ * Set result statuses OK - shorthand method to set:
+ * ul
+ * liResponseCode/li
+ * liResponseMessage/li
+ * liSuccessful status/li
+ * /ul
+ */
+public void setResponseOK(){
+setResponseCodeOK();
+setResponseMessageOK();
+setSuccessful(true);
+}
+
 public String getThreadName() {
 return threadName;
 }
@@ -537,8 +551,8 @@
 responseData = response.getBytes(encodeUsing);
 setDataEncoding(encodeUsing);
 } catch (UnsupportedEncodingException e) {
-log.warn(Could not convert string using +encodeUsing+
-, using default encoding: +DEFAULT_CHARSET+ 
+e.getLocalizedMessage());
+log.warn(Could not convert string using '+encodeUsing+
+', using default encoding: +DEFAULT_CHARSET+ 
+e.getLocalizedMessage());
 responseData = response.getBytes();
 setDataEncoding(DEFAULT_CHARSET);
 }
@@ -950,8 +964,10 @@
 public void setErrorCount(int i){// for reading from CSV files
 // ignored currently
 }
+
 /*
- * TODO: error counting needs to be sorted out after 2.3 final.
+ * TODO: error counting needs to be sorted out.
+ * 
  * At present the Statistical Sampler tracks errors separately
  * It would make sense to move the error count here, but this would
  * mean lots of changes.



-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



svn commit: r910799 - in /jakarta/jmeter/trunk: src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/gui/MailReaderSamplerGui.java xdocs/changes.xml

2010-02-16 Thread sebb
Author: sebb
Date: Wed Feb 17 02:08:03 2010
New Revision: 910799

URL: http://svn.apache.org/viewvc?rev=910799view=rev
Log: (empty)

Modified:

jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/gui/MailReaderSamplerGui.java
jakarta/jmeter/trunk/xdocs/changes.xml

Modified: 
jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/gui/MailReaderSamplerGui.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/gui/MailReaderSamplerGui.java?rev=910799r1=910798r2=910799view=diff
==
--- 
jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/gui/MailReaderSamplerGui.java
 (original)
+++ 
jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/gui/MailReaderSamplerGui.java
 Wed Feb 17 02:08:03 2010
@@ -113,18 +113,22 @@
 @Override
 public void configure(TestElement element) {
 MailReaderSampler mrs = (MailReaderSampler) element;
-if (mrs.getServerType().equals(MailReaderSampler.TYPE_POP3)) {
+final String serverType = mrs.getServerType();
+if (serverType.equals(MailReaderSampler.TYPE_POP3)) {
 serverTypeBox.setSelectedItem(POP3Label);
 folderBox.setText(INBOX);
-} else if (mrs.getServerType().equals(MailReaderSampler.TYPE_POP3S)) {
+} else if (serverType.equals(MailReaderSampler.TYPE_POP3S)) {
 serverTypeBox.setSelectedItem(POP3SLabel);
 folderBox.setText(INBOX);
-} else if (mrs.getServerType().equals(MailReaderSampler.TYPE_IMAPS)) {
+} else if (serverType.equals(MailReaderSampler.TYPE_IMAPS)) {
 serverTypeBox.setSelectedItem(IMAPSLabel);
 folderBox.setText(mrs.getFolder());
-} else {
+} else if (serverType.equals(MailReaderSampler.TYPE_IMAP)) {
 serverTypeBox.setSelectedItem(IMAPLabel);
 folderBox.setText(mrs.getFolder());
+} else {
+serverTypeBox.setSelectedItem(serverType);
+folderBox.setText(mrs.getFolder());
 }
 serverBox.setText(mrs.getServer());
 portBox.setText(mrs.getPort());
@@ -167,8 +171,10 @@
 mrs.setServerType(MailReaderSampler.TYPE_POP3S);
 } else if (item.equals(IMAPSLabel)){
 mrs.setServerType(MailReaderSampler.TYPE_IMAPS);
-} else {
+} else if (item.equals(IMAPLabel)){
 mrs.setServerType(MailReaderSampler.TYPE_IMAP);
+} else {
+mrs.setServerType(item);
 }
 
 mrs.setFolder(folderBox.getText());
@@ -203,6 +209,7 @@
 serverTypeModel.addElement(IMAPLabel);
 serverTypeModel.addElement(IMAPSLabel);
 serverTypeBox = new JComboBox(serverTypeModel);
+serverTypeBox.setEditable(true);
 serverTypeBox.addActionListener(new ActionListener() {
 public void actionPerformed(ActionEvent e) {
 final String item = (String) serverTypeBox.getSelectedItem();

Modified: jakarta/jmeter/trunk/xdocs/changes.xml
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/xdocs/changes.xml?rev=910799r1=910798r2=910799view=diff
==
--- jakarta/jmeter/trunk/xdocs/changes.xml (original)
+++ jakarta/jmeter/trunk/xdocs/changes.xml Wed Feb 17 02:08:03 2010
@@ -152,6 +152,7 @@
 liBug 47556 - JMS-PoinToPoint-Sampler Timout field should use Strings/li
 liBug 47947 - Mail Reader Sampler should allow port to be overridden/li
 liBug 48155 - Multiple problems / enhancements with JMS protocol classes/li
+liAllow MailReader sampler to use arbitrary protocols/li
 /ul
 
 h3Controllers/h3



-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



svn commit: r910800 - in /jakarta/jmeter/trunk: src/jorphan/org/apache/jorphan/util/HeapDumper.java xdocs/changes.xml

2010-02-16 Thread sebb
Author: sebb
Date: Wed Feb 17 02:10:15 2010
New Revision: 910800

URL: http://svn.apache.org/viewvc?rev=910800view=rev
Log:
Add HeapDumper class for runtime generation of dumps

Added:
jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/util/HeapDumper.java   
(with props)
Modified:
jakarta/jmeter/trunk/xdocs/changes.xml

Added: jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/util/HeapDumper.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/util/HeapDumper.java?rev=910800view=auto
==
--- jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/util/HeapDumper.java 
(added)
+++ jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/util/HeapDumper.java 
Wed Feb 17 02:10:15 2010
@@ -0,0 +1,209 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the License); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ */
+
+package org.apache.jorphan.util;
+
+import java.io.File;
+import java.io.IOException;
+import java.lang.management.ManagementFactory;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+import javax.management.InstanceNotFoundException;
+import javax.management.MBeanException;
+import javax.management.MBeanServer;
+import javax.management.MalformedObjectNameException;
+import javax.management.ObjectName;
+import javax.management.RuntimeMBeanException;
+
+/**
+ * Class allowing access to Sun's heapDump method (Java 1.6+).
+ * Uses Reflection so that the code compiles on Java 1.5.
+ * The code will only work on Sun Java 1.6+.
+ */
+public class HeapDumper {
+
+// SingletonHolder idiom for lazy initialisation
+private static class DumperHolder {
+private static final HeapDumper DUMPER = new HeapDumper();
+}
+
+private static HeapDumper getInstance(){
+return DumperHolder.DUMPER;
+}
+
+// This is the name of the HotSpot Diagnostic platform MBean (Sun Java 1.6)
+// See: 
http://java.sun.com/javase/6/docs/jre/api/management/extension/com/sun/management/HotSpotDiagnosticMXBean.html
+private static final String HOTSPOT_BEAN_NAME =
+ com.sun.management:type=HotSpotDiagnostic;
+
+private static final SimpleDateFormat TIME_STAMP_FORMAT = new 
SimpleDateFormat(MMdd_hhmmss_SSS);
+
+// These are needed for invoking the method
+private final MBeanServer server;
+private final ObjectName hotspotDiagnosticBean;
+
+// If we could not find the method, store the exception here
+private final Exception exception;
+
+// Only invoked by IODH class
+private HeapDumper() {
+server = ManagementFactory.getPlatformMBeanServer(); // get the 
platform beans
+ObjectName on = null;
+Exception ex = null;
+try {
+on = new ObjectName(HOTSPOT_BEAN_NAME); // should never fail
+server.getObjectInstance(on); // See if we can actually find the 
object
+} catch (MalformedObjectNameException e) { // Should never happen
+throw new AssertionError(Could not establish the 
HotSpotDiagnostic Bean Name: +e);
+} catch (InstanceNotFoundException e) {
+ex = e;
+on = null; // Prevent useless dump attempts
+}
+exception = ex;
+hotspotDiagnosticBean = on;
+}
+
+/**
+ * Initialise the dumper, and report if there is a problem.
+ * This is optional, as the dump methods will initialise if necessary.
+ * 
+ * @throws Exception if there is a problem finding the heapDump MXBean
+ */
+public static void init() throws Exception {
+Exception e =getInstance().exception;
+if (e != null) {
+throw e;
+}
+}
+
+/**
+ * Dumps the heap to the outputFile file in the same format as the hprof 
heap dump.
+ * p
+ * Calls the dumpHeap() method of the HotSpotDiagnostic MXBean, if 
available.
+ * p
+ * See 
+ * a 
href=http://java.sun.com/javase/6/docs/jre/api/management/extension/com/sun/management/HotSpotDiagnosticMXBean.html;
+ * HotSpotDiagnosticMXBean
+ * /a
+ * @param fileName name of the heap dump file. Must be creatable, i.e. 
must not exist.
+ * @param live if true, dump only the live objects

svn commit: r910801 - in /jakarta/jmeter/trunk: src/protocol/mail/META-INF/ src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/ xdocs/

2010-02-16 Thread sebb
Author: sebb
Date: Wed Feb 17 02:22:57 2010
New Revision: 910801

URL: http://svn.apache.org/viewvc?rev=910801view=rev
Log:
Basic read-only JavaMail provider implementation for reading raw mail files

Added:
jakarta/jmeter/trunk/src/protocol/mail/META-INF/
jakarta/jmeter/trunk/src/protocol/mail/META-INF/javamail.providers

jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/MailFileFolder.java
   (with props)

jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/MailFileMessage.java
   (with props)

jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/MailFileStore.java
   (with props)
Modified:
jakarta/jmeter/trunk/xdocs/changes.xml

Added: jakarta/jmeter/trunk/src/protocol/mail/META-INF/javamail.providers
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/protocol/mail/META-INF/javamail.providers?rev=910801view=auto
==
--- jakarta/jmeter/trunk/src/protocol/mail/META-INF/javamail.providers (added)
+++ jakarta/jmeter/trunk/src/protocol/mail/META-INF/javamail.providers Wed Feb 
17 02:22:57 2010
@@ -0,0 +1 @@
+protocol=file; type=store; 
class=org.apache.jmeter.protocol.mail.sampler.MailFileStore; vendor=ASF
\ No newline at end of file

Added: 
jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/MailFileFolder.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/MailFileFolder.java?rev=910801view=auto
==
--- 
jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/MailFileFolder.java
 (added)
+++ 
jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/MailFileFolder.java
 Wed Feb 17 02:22:57 2010
@@ -0,0 +1,176 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the License); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ */
+
+package org.apache.jmeter.protocol.mail.sampler;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FilenameFilter;
+
+import javax.mail.Flags;
+import javax.mail.Folder;
+import javax.mail.Message;
+import javax.mail.MessagingException;
+import javax.mail.Store;
+import javax.mail.URLName;
+
+import org.apache.commons.io.IOUtils;
+
+public class MailFileFolder extends Folder {
+
+private static final String FILENAME_FORMAT = %d.msg;
+private static final String FILENAME_REGEX = \\d+\\.msg;
+private boolean isOpen;
+private final File folderPath;
+private static final FilenameFilter FILENAME_FILTER = new FilenameFilter(){
+public boolean accept(File dir, String name) {
+return name.matches(FILENAME_REGEX);
+}
+
+};
+
+public MailFileFolder(Store store, String path) {
+super(store);
+String base = store.getURLName().getHost(); // == ServerName from mail 
sampler
+folderPath = new File(base,path);
+}
+
+public MailFileFolder(Store store, URLName path) {
+this(store, path.getFile());
+}
+
+@Override
+public void appendMessages(Message[] messages) throws MessagingException {
+throw new MessagingException(Not supported);
+}
+
+@Override
+public void close(boolean expunge) throws MessagingException {
+this.store.close();
+isOpen = false;
+}
+
+@Override
+public boolean create(int type) throws MessagingException {
+return false;
+}
+
+@Override
+public boolean delete(boolean recurse) throws MessagingException {
+return false;
+}
+
+@Override
+public boolean exists() throws MessagingException {
+return true;
+}
+
+@Override
+public Message[] expunge() throws MessagingException {
+return null;
+}
+
+@Override
+public Folder getFolder(String name) throws MessagingException {
+return this;
+}
+
+@Override
+public String getFullName() {
+return this.toString();
+}
+
+@Override
+public Message getMessage(int index) throws MessagingException {
+File f = new

svn commit: r910809 - /jakarta/jmeter/trunk/xdocs/usermanual/component_reference.xml

2010-02-16 Thread sebb
Author: sebb
Date: Wed Feb 17 03:16:17 2010
New Revision: 910809

URL: http://svn.apache.org/viewvc?rev=910809view=rev
Log:
Update for new Mail Reader facilities

Modified:
jakarta/jmeter/trunk/xdocs/usermanual/component_reference.xml

Modified: jakarta/jmeter/trunk/xdocs/usermanual/component_reference.xml
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/xdocs/usermanual/component_reference.xml?rev=910809r1=910808r2=910809view=diff
==
--- jakarta/jmeter/trunk/xdocs/usermanual/component_reference.xml (original)
+++ jakarta/jmeter/trunk/xdocs/usermanual/component_reference.xml Wed Feb 17 
03:16:17 2010
@@ -1326,7 +1326,10 @@
 /description
 properties
 property name=Name required=Descriptive name for this element that is 
shown in the tree./property
-property name=Server Type required=YesThe protocol used by the server: 
POP3, POP3S, IMAP, IMAPS/property
+property name=Server Type required=YesThe protocol used by the server: 
POP3, POP3S, IMAP, IMAPS
+or another string representing the server type.
+For example codefile/code for use with the read-only mail file provider.
+/property
 property name=Server required=YesHostname or IP address of the 
server/property
 property name=Port required=NoPort to be used to connect to the server 
(optional)/property
 property name=Username required=User login name/property
@@ -1334,8 +1337,23 @@
 property name=Folder required=Yes, if using IMAP(S)The IMAP(S) folder to 
use/property
 property name=Number of messages to retrieve required=YesSet this to 
retrieve all or some messages/property
 property name=Delete messages from the server required=YesIf set, 
messages will be deleted after retrieval/property
-property name=Store the message using MIME required=YesWhether to store 
the message as MIME. If not, fewer headers are stored (Date, To, From, 
Subject)./property
+property name=Store the message using MIME required=YesWhether to store 
the message as MIME. 
+If so, then the entire raw message is stored in the Response Data; the headers 
are not stored as they are available in the data. 
+If not, the message headers are stored as Response Headers. 
+A few headers are stored (Date, To, From, Subject) in the body.
+/property
 /properties
+p
+Messages are stored as subsamples of the main sampler.
+In versions of JMeter after 2.3.4, multipart message parts are stored as 
subsamples of the message.
+/p
+p
+The codefile/code JavaMail provider can be used to read raw messages from 
files.
+The codeserver/code field is used to specify the path to the parent of the 
codefolder/code.
+Individual message files should be stored with the name coden.msg/code,
+where coden/code is the message number.
+The current implementation is quite basic, and is mainly intended for 
debugging purposes. 
+/p
 /component
 
 component name=Test Action index=sect-num;.1.18  width=344 
height=181 screenshot=test_action.png



-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



svn commit: r910810 - /jakarta/jmeter/trunk/build.xml

2010-02-16 Thread sebb
Author: sebb
Date: Wed Feb 17 03:17:03 2010
New Revision: 910810

URL: http://svn.apache.org/viewvc?rev=910810view=rev
Log:
Save provider file in jar

Modified:
jakarta/jmeter/trunk/build.xml

Modified: jakarta/jmeter/trunk/build.xml
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/build.xml?rev=910810r1=910809r2=910810view=diff
==
--- jakarta/jmeter/trunk/build.xml (original)
+++ jakarta/jmeter/trunk/build.xml Wed Feb 17 03:17:03 2010
@@ -906,6 +906,7 @@
 jar jarfile=${dest.jar}/ApacheJMeter_mail.jar 
manifest=${build.dir}/MANIFEST_BIN.MF
   fileset dir=${build.mail} includes=**/*.class  /
   fileset dir=${src.mail} includes=**/*.properties /
+fileset dir=${src.mail} includes=**/*.providers /
   metainf dir=. includes=LICENSE,NOTICE/
 /jar
 



-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



svn commit: r910812 - /jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/MailReaderSampler.java

2010-02-16 Thread sebb
Author: sebb
Date: Wed Feb 17 03:38:00 2010
New Revision: 910812

URL: http://svn.apache.org/viewvc?rev=910812view=rev
Log:
Add support for multipart messages
Avoid possible NPEs in To: and From: processing
Store Response Headers if not using store as MIME

Modified:

jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/MailReaderSampler.java

Modified: 
jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/MailReaderSampler.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/MailReaderSampler.java?rev=910812r1=910811r2=910812view=diff
==
--- 
jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/MailReaderSampler.java
 (original)
+++ 
jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/MailReaderSampler.java
 Wed Feb 17 03:38:00 2010
@@ -19,19 +19,24 @@
 
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
+import java.io.InputStream;
 import java.io.UnsupportedEncodingException;
+import java.util.Enumeration;
 import java.util.Properties;
 
 import javax.mail.Address;
 import javax.mail.BodyPart;
 import javax.mail.Flags;
 import javax.mail.Folder;
+import javax.mail.Header;
 import javax.mail.Message;
 import javax.mail.MessagingException;
 import javax.mail.Session;
 import javax.mail.Store;
 import javax.mail.internet.MimeMultipart;
+import javax.mail.internet.MimeUtility;
 
+import org.apache.commons.io.IOUtils;
 import org.apache.jmeter.samplers.AbstractSampler;
 import org.apache.jmeter.samplers.Entry;
 import org.apache.jmeter.samplers.SampleResult;
@@ -86,12 +91,10 @@
 boolean deleteMessages = getDeleteMessages();
 
 parent.setSampleLabel(getName());
-int port=getPortAsInt();
-if (port  0){
-parent.setSamplerData(getServerType() + :// + getUserName() + 
@ + getServer()+ : + port);
-} else {
-parent.setSamplerData(getServerType() + :// + getUserName() + 
@ + getServer());
-}
+
+String samplerString = toString();
+parent.setSamplerData(samplerString);
+
 /*
  * Perform the sampling
  */
@@ -105,11 +108,7 @@
 
 // Get the store
 Store store = session.getStore(getServerType());
-if (port  0){
-store.connect(getServer(), port, getUserName(), getPassword());
-} else {
-store.connect(getServer(), getUserName(), getPassword());
-}
+store.connect(getServer(), getPortAsInt(), getUserName(), 
getPassword());
 
 // Get folder
 Folder folder = store.getFolder(getFolder());
@@ -121,47 +120,66 @@
 
 // Get directory
 Message messages[] = folder.getMessages();
-Message message;
 StringBuilder pdata = new StringBuilder();
 pdata.append(messages.length);
 pdata.append( messages found\n);
+parent.setResponseData(pdata.toString(),null);
+parent.setDataType(SampleResult.TEXT);
+parent.setContentType(text/plain); // $NON-NLS-1$
 
 int n = getNumMessages();
 if (n == ALL_MESSAGES || n  messages.length) {
 n = messages.length;
 }
 
+parent.setSampleCount(n); // TODO is this sensible?
+
 for (int i = 0; i  n; i++) {
 StringBuilder cdata = new StringBuilder();
 SampleResult child = new SampleResult();
 child.sampleStart();
-message = messages[i];
-
-//if (i == 0)
-{ // Assumes all the messaged have the same type ...
-child.setContentType(message.getContentType());
-}
-
+Message message = messages[i];
+
 cdata.append(Message ); // $NON-NLS-1$
 cdata.append(message.getMessageNumber());
 child.setSampleLabel(cdata.toString());
 child.setSamplerData(cdata.toString());
 cdata.setLength(0);
 
+final String contentType = message.getContentType();
+child.setContentType(contentType);// Store the content-type
+
 if (isStoreMimeMessage()) {
-appendMessageAsMime(cdata, message);
+// Don't save headers - they are already in the raw message
+ByteArrayOutputStream bout = new ByteArrayOutputStream();
+message.writeTo(bout);
+child.setResponseData(bout.toByteArray()); // Save raw 
message
+child.setDataType(SampleResult.TEXT);
+child.setDataEncoding(iso-8859-1); // RFC 822 uses ascii

svn commit: r910820 - /jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/MailReaderSampler.java

2010-02-16 Thread sebb
Author: sebb
Date: Wed Feb 17 04:52:39 2010
New Revision: 910820

URL: http://svn.apache.org/viewvc?rev=910820view=rev
Log:
Forgot to call sampleStart()

Modified:

jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/MailReaderSampler.java

Modified: 
jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/MailReaderSampler.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/MailReaderSampler.java?rev=910820r1=910819r2=910820view=diff
==
--- 
jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/MailReaderSampler.java
 (original)
+++ 
jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/MailReaderSampler.java
 Wed Feb 17 04:52:39 2010
@@ -262,6 +262,7 @@
 sr.setContentType(contentType);
 sr.setEncodingAndType(contentType);
 sr.setResponseHeaders(bodyPart.getClass().getName());// TODO
+sr.sampleStart();
 if (bodyPartContent instanceof InputStream){
 sr.setResponseData(IOUtils.toByteArray((InputStream) 
bodyPartContent));
 } else {



-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



svn commit: r910824 - /jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/MailReaderSampler.java

2010-02-16 Thread sebb
Author: sebb
Date: Wed Feb 17 05:04:26 2010
New Revision: 910824

URL: http://svn.apache.org/viewvc?rev=910824view=rev
Log:
Fix duplicate child.sampleEnd() calls

Modified:

jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/MailReaderSampler.java

Modified: 
jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/MailReaderSampler.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/MailReaderSampler.java?rev=910824r1=910823r2=910824view=diff
==
--- 
jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/MailReaderSampler.java
 (original)
+++ 
jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/MailReaderSampler.java
 Wed Feb 17 05:04:26 2010
@@ -180,7 +180,9 @@
 message.setFlag(Flags.Flag.DELETED, true);
 }
 child.setResponseOK();
-child.sampleEnd();
+if (child.getEndTime()==0){// Avoid double-call if 
addSubResult was called.
+child.sampleEnd();
+}
 parent.addSubResult(child);
 }
 
@@ -261,7 +263,6 @@
 sr.setSampleLabel(Part: +j);
 sr.setContentType(contentType);
 sr.setEncodingAndType(contentType);
-sr.setResponseHeaders(bodyPart.getClass().getName());// TODO
 sr.sampleStart();
 if (bodyPartContent instanceof InputStream){
 sr.setResponseData(IOUtils.toByteArray((InputStream) 
bodyPartContent));



-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



svn commit: r910224 - /jakarta/jmeter/trunk/src/components/org/apache/jmeter/visualizers/RenderAsXML.java

2010-02-15 Thread sebb
Author: sebb
Date: Mon Feb 15 14:24:25 2010
New Revision: 910224

URL: http://svn.apache.org/viewvc?rev=910224view=rev
Log:
Remove dependency on default encoding

Modified:

jakarta/jmeter/trunk/src/components/org/apache/jmeter/visualizers/RenderAsXML.java

Modified: 
jakarta/jmeter/trunk/src/components/org/apache/jmeter/visualizers/RenderAsXML.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/components/org/apache/jmeter/visualizers/RenderAsXML.java?rev=910224r1=910223r2=910224view=diff
==
--- 
jakarta/jmeter/trunk/src/components/org/apache/jmeter/visualizers/RenderAsXML.java
 (original)
+++ 
jakarta/jmeter/trunk/src/components/org/apache/jmeter/visualizers/RenderAsXML.java
 Mon Feb 15 14:24:25 2010
@@ -49,7 +49,7 @@
 
 private static final Logger log = LoggingManager.getLoggerForClass();
 
-private static final byte[] XML_PFX = ?xml .getBytes(); // $NON-NLS-1$
+private static final byte[] XML_PFX = {'','?','x','m','l',' '};//?xml 
 
 public RenderAsXML(){
 activateSearchExtension = false; // TODO work out how to search the 
XML pane



-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



svn commit: r910377 - /jakarta/jmeter/trunk/lib/api/

2010-02-15 Thread sebb
Author: sebb
Date: Tue Feb 16 02:02:41 2010
New Revision: 910377

URL: http://svn.apache.org/viewvc?rev=910377view=rev
Log:
Allow any versions of geronimo spec jars

Modified:
jakarta/jmeter/trunk/lib/api/   (props changed)

Propchange: jakarta/jmeter/trunk/lib/api/
--
--- svn:ignore (original)
+++ svn:ignore Tue Feb 16 02:02:41 2010
@@ -1,4 +1,4 @@
-geronimo-activation_1.0.2_spec-1.1.jar
-geronimo-jms_1.1_spec-1.0.jar
-geronimo-javamail_1.3.1_spec-1.1.jar
+geronimo-activation_*_spec-*.jar
+geronimo-jms_*_spec-*.jar
+geronimo-javamail_*_spec-*.jar
 bsf-api-*.jar



-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



svn commit: r910379 - /jakarta/jmeter/trunk/build.properties

2010-02-15 Thread sebb
Author: sebb
Date: Tue Feb 16 02:18:35 2010
New Revision: 910379

URL: http://svn.apache.org/viewvc?rev=910379view=rev
Log:
More recent versions of Geronimo spec jars

Modified:
jakarta/jmeter/trunk/build.properties

Modified: jakarta/jmeter/trunk/build.properties
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/build.properties?rev=910379r1=910378r2=910379view=diff
==
--- jakarta/jmeter/trunk/build.properties (original)
+++ jakarta/jmeter/trunk/build.properties Tue Feb 16 02:18:35 2010
@@ -184,19 +184,17 @@
 xmlgraphics-commons.md5 = E63589601D939739349A50A029DAB120
 
 # Geronimo API jars (compile-time only)
-activation.jar  = geronimo-activation_1.0.2_spec-1.1.jar
-activation.loc  = 
http://mirrors.ibiblio.org/pub/mirrors/maven/org.apache.geronimo.specs/jars
-# diff
-activation.md5  = 6a3a594753a07b325f21d32c452c3779
+activation.jar  = geronimo-activation_1.1_spec-1.0.2.jar
+activation.loc  = 
http://repo2.maven.org/maven2/org/apache/geronimo/specs/geronimo-activation_1.1_spec/1.0.2/
+activation.md5  = 9759ed85c6e767bf3dc00c4cf635c4e2
 
-javamail.jar= geronimo-javamail_1.3.1_spec-1.1.jar
-javamail.loc= 
http://mirrors.ibiblio.org/pub/mirrors/maven/org.apache.geronimo.specs/jars
-# diff 
-javamail.md5= 529c667a51cc4febdff3caeda4675cb4
+javamail.jar= geronimo-javamail_1.4_spec-1.6.jar
+javamail.loc= 
http://repo2.maven.org/maven2/org/apache/geronimo/specs/geronimo-javamail_1.4_spec/1.6/
+javamail.md5= 2bcb3208c8e0c8e9713d8222abb33788
 
-jms.jar = geronimo-jms_1.1_spec-1.0.jar
-jms.loc = 
http://mirrors.ibiblio.org/pub/mirrors/maven/org.apache.geronimo.specs/jars
-jms.md5 = 3A10BDB4AB6455AB16E4FC543BBD6B89
+jms.jar = geronimo-jms_1.1_spec-1.1.1.jar
+jms.loc = 
http://repo2.maven.org/maven2/org/apache/geronimo/specs/geronimo-jms_1.1_spec/1.1.1/
+jms.md5 = d80ce71285696d36c1add1989b94f084
 
 # The following jars are only needed for source distributions
 # They are used for building the documentation



-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



Re: site broken

2010-02-13 Thread sebb
On 13/02/2010, Luke Nezda lne...@gmail.com wrote:
 Hello -

  The server for the main page, http://jakarta.apache.org/jmeter/, seems to be
  misconfigured somehow.  Going to that URL with Mozilla/5.0 (Macintosh; U;
  Intel Mac OS X 10.6; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6) I get the
  following error:

  Content Encoding Error

  The page you are trying to view cannot be shown because it uses an invalid
  or unsupported form of compression.
 *   Please contact the website owners to inform them of this problem.

  I was able to view the site using Safari.

I think it's OK now - I have no problems using IE8, Opera10 or Firefox 3.5.x

  Only related thing I found when searching was
  http://groups.google.com/group/fusionreactor/msg/c5ccde4bd34ad6f6 which
  references GzipFilter servlet filter.

  Cheers,

 - Luke


-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



Re: site broken

2010-02-13 Thread sebb
On 13/02/2010, Rainer Jung rainer.j...@kippdata.de wrote:
 On 13.02.2010 16:55, sebb wrote:

  On 13/02/2010, Luke Nezdalne...@gmail.com  wrote:
 
   Hello -
  
The server for the main page,
 http://jakarta.apache.org/jmeter/, seems to be
misconfigured somehow.  Going to that URL with Mozilla/5.0 (Macintosh;
 U;
Intel Mac OS X 10.6; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6) I get
 the
following error:
  
Content Encoding Error
  
The page you are trying to view cannot be shown because it uses an
 invalid
or unsupported form of compression.
   *   Please contact the website owners to inform them of this
 problem.
  
I was able to view the site using Safari.
  
 
  I think it's OK now - I have no problems using IE8, Opera10 or Firefox
 3.5.x
 

  There are people with complains also showing up on other lists, like infra,
 svn and tomcat. It seems it does not happen on every request and it also
 might be a question of which of servers you actually hit (europe or us). See

  http://marc.info/?t=12660725582r=1w=2

I've just tried both the us and eu mirrors, and have seen no problems
with either:

http://jakarta.eu.apache.org/jmeter/index.html
http://jakarta.us.apache.org/jmeter/index.html

Maybe the problem has been fixed, or maybe I'm just lucky...

  Regards,

  Rainer

 -
  To unsubscribe, e-mail:
 jmeter-dev-unsubscr...@jakarta.apache.org
  For additional commands, e-mail:
 jmeter-dev-h...@jakarta.apache.org



-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



Re: HttpSampler sample per embeded resource support

2010-02-12 Thread sebb
On 12/02/2010, Eugene Rachitskiy professoreug...@gmail.com wrote:
 Hello Everyone,

I'm new to this list, but have been working with JMeter for a couple
  of years.  When one has the HTTP or HttpClient samplers configured to
  download all embedded resources, it would be nice to be able to configure
  the sampler behavior in such a way that each embedded request (GET) would
  count as a separate sample.  For example, fetching an object that has two
  images would report three samples rather than one.

It already reports one sample per image, it's just that the sample
results are attached as child samples of the original sample.

At the moment, there does not seem to be a way of doing this other
  than configuring a sampler/embedded resource.  Is anyone interested in this
  functionality?  If so, I've put up a patch against 2.3.4/r786921 over at
  http://svn.campuseai.org/patches/jmeter/samplePerRequest-2.3.4-786921.diff .

What's wrong with the current behaviour?

  Cheers,

 Eugene


-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



svn commit: r908939 - /jakarta/jmeter/trunk/xdocs/usermanual/component_reference.xml

2010-02-11 Thread sebb
Author: sebb
Date: Thu Feb 11 11:46:51 2010
New Revision: 908939

URL: http://svn.apache.org/viewvc?rev=908939view=rev
Log:
Clarifications

Modified:
jakarta/jmeter/trunk/xdocs/usermanual/component_reference.xml

Modified: jakarta/jmeter/trunk/xdocs/usermanual/component_reference.xml
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/xdocs/usermanual/component_reference.xml?rev=908939r1=908938r2=908939view=diff
==
--- jakarta/jmeter/trunk/xdocs/usermanual/component_reference.xml (original)
+++ jakarta/jmeter/trunk/xdocs/usermanual/component_reference.xml Thu Feb 11 
11:46:51 2010
@@ -433,7 +433,8 @@
 component name=Java Request index=sect-num;.1.4  width=406 
height=307 screenshot=java_request.png
 
 descriptionpThis sampler lets you control a java class that implements the
-JavaSamplerClient interface.  By writing your own implementation of this 
interface,
+bcodeorg.apache.jmeter.protocol.java.sampler.JavaSamplerClient/code/b 
interface.
+By writing your own implementation of this interface,
 you can use JMeter to harness multiple threads, input parameter control, and
 data collection./p
 pThe pull-down menu provides the list of all such implementations found by
@@ -4371,8 +4372,17 @@
 [The option does not affect CSV result files, which cannot currently store 
such information.]
 /p
 pAlso, an option exists here to instruct JMeter to run the complink 
name=Thread Group/ serially rather than in parallel./p
-pTest plan now provides an easy way to add classpath setting to a specific 
test plan. The feature is additive, meaning that you can add jar files or 
directories, but removing an entry requires restarting JMeter. In the past, 
users had to copy all the jar files to jmeter/lib/ directory. Now that is not 
necessary. JMeter properties also provides an entry for loading additional 
classpaths./p
-pIn jmeter.properties, edit user.classpath to include additional 
libraries./p/description
+p
+Test plan now provides an easy way to add classpath setting to a specific test 
plan. 
+The feature is additive, meaning that you can add jar files or directories, 
but removing an entry requires restarting JMeter.
+Note that this cannot be used to add JMeter GUI plugins, because they are 
processed earlier.
+However it can be useful for utility jars such as JDBC drivers. 
+/p
+p
+JMeter properties also provides an entry for loading additional classpaths.
+In jmeter.properties, edit user.classpath to include additional libraries.
+/p
+/description
 /component
 
 component name=Thread Group index=sect-num;.9.2  width=411 
height=419 screenshot=threadgroup.png



-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



svn commit: r909130 - in /jakarta/jmeter/trunk: src/components/org/apache/jmeter/assertions/ src/components/org/apache/jmeter/extractor/ src/components/org/apache/jmeter/modifiers/ src/components/org/

2010-02-11 Thread sebb
Author: sebb
Date: Thu Feb 11 20:19:06 2010
New Revision: 909130

URL: http://svn.apache.org/viewvc?rev=909130view=rev
Log:
Bug 48714 -  add new French messages

Added:

jakarta/jmeter/trunk/src/components/org/apache/jmeter/assertions/JSR223AssertionResources_fr.properties
   (with props)

jakarta/jmeter/trunk/src/components/org/apache/jmeter/extractor/JSR223PostProcessorResources_fr.properties
   (with props)

jakarta/jmeter/trunk/src/components/org/apache/jmeter/timers/JSR223TimerResources_fr.properties
   (with props)
Modified:

jakarta/jmeter/trunk/src/components/org/apache/jmeter/modifiers/JSR223PreProcessorResources_fr.properties

jakarta/jmeter/trunk/src/components/org/apache/jmeter/visualizers/JSR223ListenerResources_fr.properties

jakarta/jmeter/trunk/src/core/org/apache/jmeter/resources/messages_fr.properties
jakarta/jmeter/trunk/xdocs/changes.xml

Added: 
jakarta/jmeter/trunk/src/components/org/apache/jmeter/assertions/JSR223AssertionResources_fr.properties
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/components/org/apache/jmeter/assertions/JSR223AssertionResources_fr.properties?rev=909130view=auto
==
--- 
jakarta/jmeter/trunk/src/components/org/apache/jmeter/assertions/JSR223AssertionResources_fr.properties
 (added)
+++ 
jakarta/jmeter/trunk/src/components/org/apache/jmeter/assertions/JSR223AssertionResources_fr.properties
 Thu Feb 11 20:19:06 2010
@@ -0,0 +1,29 @@
+#   Licensed to the Apache Software Foundation (ASF) under one or more
+#   contributor license agreements.  See the NOTICE file distributed with
+#   this work for additional information regarding copyright ownership.
+#   The ASF licenses this file to You under the Apache License, Version 2.0
+#   (the License); you may not use this file except in compliance with
+#   the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+#   Unless required by applicable law or agreed to in writing, software
+#   distributed under the License is distributed on an AS IS BASIS,
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#   See the License for the specific language governing permissions and
+#   limitations under the License.
+
+#Stored by I18NEdit, may be edited!
+displayName=Assertion JSR223
+filename.displayName=Nom de fichier 
+filename.shortDescription=Fichier de script (remplace le script)
+filenameGroup.displayName=Fichier de script (remplace le script)
+parameterGroup.displayName=Param\u00E8tres \u00E0 passer au script (\= String 
Parameters and String []args)
+parameters.displayName=Param\u00E8tres
+parameters.shortDescription=Param\u00E8tres \u00E0 passer au fichier ou au 
script
+script.displayName=Script
+script.shortDescription=Script dans le langage JSR223 appropri\u00E9
+scriptLanguage.displayName=Langage 
+scriptLanguage.shortDescription=Nom du langage JSR223, i.e. groovy, jython, 
jruby, etc.
+scripting.displayName=Script (variables\: ctx vars props SampleResult (avant 
prev) AssertionResult sampler log Label Filename Parameters args[] OUT)
+scriptingLanguage.displayName=Langage de script (i.e. groovy, javascript, 
jexl, etc.)

Propchange: 
jakarta/jmeter/trunk/src/components/org/apache/jmeter/assertions/JSR223AssertionResources_fr.properties
--
svn:eol-style = native

Added: 
jakarta/jmeter/trunk/src/components/org/apache/jmeter/extractor/JSR223PostProcessorResources_fr.properties
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/components/org/apache/jmeter/extractor/JSR223PostProcessorResources_fr.properties?rev=909130view=auto
==
--- 
jakarta/jmeter/trunk/src/components/org/apache/jmeter/extractor/JSR223PostProcessorResources_fr.properties
 (added)
+++ 
jakarta/jmeter/trunk/src/components/org/apache/jmeter/extractor/JSR223PostProcessorResources_fr.properties
 Thu Feb 11 20:19:06 2010
@@ -0,0 +1,29 @@
+#   Licensed to the Apache Software Foundation (ASF) under one or more
+#   contributor license agreements.  See the NOTICE file distributed with
+#   this work for additional information regarding copyright ownership.
+#   The ASF licenses this file to You under the Apache License, Version 2.0
+#   (the License); you may not use this file except in compliance with
+#   the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+#   Unless required by applicable law or agreed to in writing, software
+#   distributed under the License is distributed on an AS IS BASIS,
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#   See the License for the specific language governing permissions and
+#   limitations under the License.
+
+#Stored by I18NEdit, may be edited!
+displayName

svn commit: r908128 - /jakarta/jmeter/trunk/src/core/org/apache/jmeter/reporters/ResultCollector.java

2010-02-09 Thread sebb
Author: sebb
Date: Tue Feb  9 17:50:00 2010
New Revision: 908128

URL: http://svn.apache.org/viewvc?rev=908128view=rev
Log:
Thread-safety fixes

Modified:

jakarta/jmeter/trunk/src/core/org/apache/jmeter/reporters/ResultCollector.java

Modified: 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/reporters/ResultCollector.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/reporters/ResultCollector.java?rev=908128r1=908127r2=908128view=diff
==
--- 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/reporters/ResultCollector.java 
(original)
+++ 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/reporters/ResultCollector.java 
Tue Feb  9 17:50:00 2010
@@ -122,7 +122,7 @@
 //@GuardedBy(LOCK)
 private static int instanceCount; // Keep track of how many instances are 
active
 
-// Instance variables
+// Instance variables (guarded by volatile)
 
 private transient volatile PrintWriter out;
 
@@ -131,7 +131,7 @@
 private volatile boolean isStats = false;
 
 /** the summarizer to which this result collector will forward the samples 
*/
-private Summariser summariser;
+private volatile Summariser summariser;
 
 /**
  * No-arg constructor.
@@ -170,11 +170,11 @@
 return getPropertyAsBoolean(ERROR_LOGGING);
 }
 
-public void setErrorLogging(boolean errorLogging) {
+public final void setErrorLogging(boolean errorLogging) {
 setProperty(new BooleanProperty(ERROR_LOGGING, errorLogging));
 }
 
-public void setSuccessOnlyLogging(boolean value) {
+public final void setSuccessOnlyLogging(boolean value) {
 if (value) {
 setProperty(new BooleanProperty(SUCCESS_ONLY_LOGGING, true));
 } else {
@@ -248,7 +248,7 @@
 }
 }
 
-public synchronized void testStarted(String host) {
+public void testStarted(String host) {
 synchronized(LOCK){
 instanceCount++;
 try {



-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



svn commit: r908129 - in /jakarta/jmeter/trunk/src/core/org/apache/jmeter/threads: JMeterContextService.java JMeterThread.java

2010-02-09 Thread sebb
Author: sebb
Date: Tue Feb  9 17:50:44 2010
New Revision: 908129

URL: http://svn.apache.org/viewvc?rev=908129view=rev
Log:
Clear JMeterContext ThreadLocal on thread end

Modified:

jakarta/jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterContextService.java
jakarta/jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterThread.java

Modified: 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterContextService.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterContextService.java?rev=908129r1=908128r2=908129view=diff
==
--- 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterContextService.java
 (original)
+++ 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterContextService.java
 Tue Feb  9 17:50:44 2010
@@ -57,6 +57,15 @@
 }
 
 /**
+ * Allows the thread Context to be completely cleared.
+ * br/
+ * Invokes {...@link ThreadLocal#remove()}.
+ */
+static void removeContext(){ // Currently only used by JMeterThread
+threadContext.remove();
+}
+
+/**
  * Method is called by the JMeterEngine class when a test run is started.
  * Zeroes numberOfActiveThreads.
  * Saves current time in a field and in the JMeter property TESTSTART.MS

Modified: 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterThread.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterThread.java?rev=908129r1=908128r2=908129view=diff
==
--- jakarta/jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterThread.java 
(original)
+++ jakarta/jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterThread.java 
Tue Feb  9 17:50:44 2010
@@ -268,6 +268,7 @@
 log.info(Thread finished:  + threadName);
 threadFinished();
 monitor.threadFinished(this); // Tell the engine we are done
+JMeterContextService.removeContext(); // Remove the ThreadLocal 
entry
 }
 }
 



-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



svn commit: r908130 - /jakarta/jmeter/trunk/build.xml

2010-02-09 Thread sebb
Author: sebb
Date: Tue Feb  9 17:51:08 2010
New Revision: 908130

URL: http://svn.apache.org/viewvc?rev=908130view=rev
Log:
Oops - comparing the wrong files

Modified:
jakarta/jmeter/trunk/build.xml

Modified: jakarta/jmeter/trunk/build.xml
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/build.xml?rev=908130r1=908129r2=908130view=diff
==
--- jakarta/jmeter/trunk/build.xml (original)
+++ jakarta/jmeter/trunk/build.xml Tue Feb  9 17:51:08 2010
@@ -1753,12 +1753,16 @@
 /condition
 fail unless=BatchTestLocal.csv.OK
 CSV Files are not identical.
+   ${batchtest.inp}/${batchtest.name}.csv
+   ${batchtest.out}/${batchtest.name}.csv
 /fail
 condition property=BatchTestLocal.xml.OK
-   filesmatch file1=${batchtest.inp}/${batchtest.name}.csv 
file2=${batchtest.out}/${batchtest.name}.csv/
+   filesmatch file1=${batchtest.inp}/${batchtest.name}.xml 
file2=${batchtest.out}/${batchtest.name}.xml/
 /condition
 fail unless=BatchTestLocal.xml.OK
 XML Files are not identical.
+   ${batchtest.inp}/${batchtest.name}.xml
+   ${batchtest.out}/${batchtest.name}.xml
 /fail
 
 echo level=info${batchtest.name} output files compared OK/echo



-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



svn commit: r908165 - /jakarta/jmeter/trunk/src/functions/org/apache/jmeter/functions/FileWrapper.java

2010-02-09 Thread sebb
Author: sebb
Date: Tue Feb  9 19:24:04 2010
New Revision: 908165

URL: http://svn.apache.org/viewvc?rev=908165view=rev
Log:
Better ordering of elements

Modified:

jakarta/jmeter/trunk/src/functions/org/apache/jmeter/functions/FileWrapper.java

Modified: 
jakarta/jmeter/trunk/src/functions/org/apache/jmeter/functions/FileWrapper.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/functions/org/apache/jmeter/functions/FileWrapper.java?rev=908165r1=908164r2=908165view=diff
==
--- 
jakarta/jmeter/trunk/src/functions/org/apache/jmeter/functions/FileWrapper.java 
(original)
+++ 
jakarta/jmeter/trunk/src/functions/org/apache/jmeter/functions/FileWrapper.java 
Tue Feb  9 19:24:04 2010
@@ -39,10 +39,6 @@
 
 private static final Logger log = LoggingManager.getLoggerForClass();
 
-private FileRowColContainer container;
-
-private int currentRow;
-
 private static final int NO_LINE = -1;
 
 private static volatile String defaultFile = ; // for omitted file names 
//$NON-NLS-1$
@@ -55,15 +51,6 @@
 private static final MapString, FileRowColContainer fileContainers =
 new HashMapString, FileRowColContainer();
 
-/*
- * Only needed locally
- */
-private FileWrapper(FileRowColContainer fdc) {
-super();
-container = fdc;
-currentRow = -1;
-}
-
 /* The cache of file packs - used to improve thread access */
 private static final ThreadLocalMapString, FileWrapper filePacks = 
 new ThreadLocalMapString, FileWrapper() {
@@ -73,6 +60,19 @@
 }
 };
 
+private final FileRowColContainer container;
+
+private int currentRow;
+
+/*
+ * Only needed locally
+ */
+private FileWrapper(FileRowColContainer fdc) {
+super();
+container = fdc;
+currentRow = -1;
+}
+
 private static String checkDefault(String file) {
 if (file.length() == 0) {
 if (fileContainers.size() == 1  defaultFile.length()  0) {



-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



svn commit: r908166 - /jakarta/jmeter/trunk/src/core/org/apache/jmeter/services/FileServer.java

2010-02-09 Thread sebb
Author: sebb
Date: Tue Feb  9 19:24:33 2010
New Revision: 908166

URL: http://svn.apache.org/viewvc?rev=908166view=rev
Log:
Thread-safety

Modified:
jakarta/jmeter/trunk/src/core/org/apache/jmeter/services/FileServer.java

Modified: 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/services/FileServer.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/services/FileServer.java?rev=908166r1=908165r2=908166view=diff
==
--- jakarta/jmeter/trunk/src/core/org/apache/jmeter/services/FileServer.java 
(original)
+++ jakarta/jmeter/trunk/src/core/org/apache/jmeter/services/FileServer.java 
Tue Feb  9 19:24:33 2010
@@ -59,10 +59,10 @@
 
 private static final String DEFAULT_BASE = 
JMeterUtils.getProperty(user.dir);
 
+//@GuardedBy(this)
 private File base;
 
-//TODO - make files and random static as the class is a singleton?
-
+//@GuardedBy(this)
 private final MapString, FileEntry files = new HashMapString, 
FileEntry();
 
 private static final FileServer server = new FileServer();
@@ -254,7 +254,7 @@
 return new BufferedWriter(osw);
 }
 
-public void closeFiles() throws IOException {
+public synchronized void closeFiles() throws IOException {
 IteratorMap.EntryString, FileEntry  iter = 
files.entrySet().iterator();
 while (iter.hasNext()) {
 Map.EntryString, FileEntry me = iter.next();
@@ -286,7 +286,7 @@
 }
 }
 
-protected boolean filesOpen() {
+boolean filesOpen() { // package access for test code only
 IteratorFileEntry iter = files.values().iterator();
 while (iter.hasNext()) {
 FileEntry fileEntry = iter.next();



-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



svn commit: r908191 - in /jakarta/jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/client: ClientPool.java InitialContextFactory.java

2010-02-09 Thread sebb
Author: sebb
Date: Tue Feb  9 20:07:58 2010
New Revision: 908191

URL: http://svn.apache.org/viewvc?rev=908191view=rev
Log:
Thread-safety

Modified:

jakarta/jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/client/ClientPool.java

jakarta/jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/client/InitialContextFactory.java

Modified: 
jakarta/jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/client/ClientPool.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/client/ClientPool.java?rev=908191r1=908190r2=908191view=diff
==
--- 
jakarta/jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/client/ClientPool.java
 (original)
+++ 
jakarta/jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/client/ClientPool.java
 Tue Feb  9 20:07:58 2010
@@ -33,6 +33,7 @@
  */
 public class ClientPool {
 
+//GuardedBy(this)
 private static final ArrayListObject clients = new ArrayListObject();
 
 private static final MapObject, Object client_map = new HashMapObject, 
Object();

Modified: 
jakarta/jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/client/InitialContextFactory.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/client/InitialContextFactory.java?rev=908191r1=908190r2=908191view=diff
==
--- 
jakarta/jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/client/InitialContextFactory.java
 (original)
+++ 
jakarta/jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/client/InitialContextFactory.java
 Tue Feb  9 20:07:58 2010
@@ -36,6 +36,7 @@
  */
 public class InitialContextFactory {
 
+//GuardedBy(this)
 private static final HashMapString, Context MAP = new HashMapString, 
Context();
 
 private static final Logger log = LoggingManager.getLoggerForClass();
@@ -91,7 +92,7 @@
 /**
  * clear all the InitialContext objects.
  */
-public static void close() {
+public synchronized static void close() { // TODO - why is this not used?
 Iterator? itr = MAP.keySet().iterator();
 while (itr.hasNext()) {
 Context ctx = MAP.get(itr.next());
@@ -101,6 +102,7 @@
 log.error(e.getMessage());
 }
 }
+MAP.clear();
 log.info(InitialContextFactory.close() called and Context instances 
cleaned up);
 }
 }



-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



svn commit: r908219 [2/2] - in /jakarta/jmeter/trunk: src/components/org/apache/jmeter/assertions/ src/components/org/apache/jmeter/control/ src/components/org/apache/jmeter/control/gui/ src/component

2010-02-09 Thread sebb
Modified: 
jakarta/jmeter/trunk/src/examples/org/apache/jmeter/examples/sampler/gui/ExampleSamplerGui.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/examples/org/apache/jmeter/examples/sampler/gui/ExampleSamplerGui.java?rev=908219r1=908218r2=908219view=diff
==
--- 
jakarta/jmeter/trunk/src/examples/org/apache/jmeter/examples/sampler/gui/ExampleSamplerGui.java
 (original)
+++ 
jakarta/jmeter/trunk/src/examples/org/apache/jmeter/examples/sampler/gui/ExampleSamplerGui.java
 Tue Feb  9 21:09:23 2010
@@ -53,19 +53,15 @@
 init();
 }
 
-/*
- * (non-Javadoc)
- *
- * @see org.apache.jmeter.gui.JMeterGUIComponent#getStaticLabel()
+/**
+ * {...@inheritdoc}
  */
 public String getLabelResource() {
 return example_title; // $NON-NLS-1$
 }
 
-/*
- * (non-Javadoc) Copy the data from the test element to the GUI
- *
- * @see 
org.apache.jmeter.gui.JMeterGUIComponent#configure(org.apache.jmeter.testelement.TestElement)
+/**
+ * {...@inheritdoc}
  */
 @Override
 public void configure(TestElement element) {
@@ -73,10 +69,8 @@
 super.configure(element);
 }
 
-/*
- * (non-Javadoc) Create the corresponding Test Element and set up its data
- *
- * @see org.apache.jmeter.gui.JMeterGUIComponent#createTestElement()
+/**
+ * {...@inheritdoc}
  */
 public TestElement createTestElement() {
 ExampleSampler sampler = new ExampleSampler();
@@ -84,11 +78,8 @@
 return sampler;
 }
 
-/*
- * (non-Javadoc) Modifies a given TestElement to mirror the data in the gui
- * components.
- *
- * @see 
org.apache.jmeter.gui.JMeterGUIComponent#modifyTestElement(TestElement)
+/**
+ * {...@inheritdoc}
  */
 public void modifyTestElement(TestElement te) {
 te.clear();
@@ -128,6 +119,9 @@
 return dataPanel;
 }
 
+/**
+ * {...@inheritdoc}
+ */
 @Override
 public void clearGui() {
 super.clearGui();

Modified: 
jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/gui/AbstractTreeTableModel.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/gui/AbstractTreeTableModel.java?rev=908219r1=908218r2=908219view=diff
==
--- 
jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/gui/AbstractTreeTableModel.java
 (original)
+++ 
jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/gui/AbstractTreeTableModel.java
 Tue Feb  9 21:09:23 2010
@@ -75,28 +75,30 @@
 return this.rootNode;
 }
 
-/* (non-Javadoc)
- * @see org.apache.jorphan.gui.TreeTableModel#getValueAt(java.lang.Object, 
int)
+/**
+ * {...@inheritdoc}
  */
 public Object getValueAt(Object node, int col) {
 return null;
 }
 
-/* (non-Javadoc)
- * @see 
org.apache.jorphan.gui.TreeTableModel#isCellEditable(java.lang.Object, int)
+/**
+ * {...@inheritdoc}
  */
 public boolean isCellEditable(Object node, int col) {
 return false;
 }
 
-/* (non-Javadoc)
- * @see org.apache.jorphan.gui.TreeTableModel#setValueAt(java.lang.Object, 
java.lang.Object, int)
+/**
+ * {...@inheritdoc}
  */
 public void setValueAt(Object val, Object node, int column) {
 }
 
 /**
  * The implementation is exactly the same as 
ObjectTableModel.getColumnCount.
+ * p
+ * {...@inheritdoc}
  */
 @Override
 public int getColumnCount() {
@@ -105,6 +107,8 @@
 
 /**
  * The implementation is exactly the same as ObjectTableModel.getRowCount.
+ * p
+ * {...@inheritdoc}
  */
 @Override
 public int getRowCount() {
@@ -117,12 +121,17 @@
 /**
  * By default the abstract class returns true. It is up to subclasses
  * to override the implementation.
+ * p
+ * {...@inheritdoc}
  */
 @Override
 public boolean isCellEditable(int rowIndex, int columnIndex) {
 return true;
 }
 
+/**
+ * {...@inheritdoc}
+ */
 @Override
 public Class? getColumnClass(int arg0) {
 return classes.get(arg0);
@@ -131,6 +140,8 @@
 /**
  * Subclasses need to implement the logic for the method and
  * return the value at the specific cell.
+ * p
+ * {...@inheritdoc}
  */
 @Override
 public Object getValueAt(int rowIndex, int columnIndex) {
@@ -138,7 +149,7 @@
 }
 
 /**
- *
+ * {...@inheritdoc}
  */
 @Override
 public void setValueAt(Object aValue, int rowIndex, int columnIndex) {
@@ -146,7 +157,7 @@
 }
 
 /**
- *
+ * {...@inheritdoc}
  */
 @Override
 public String getColumnName(int columnIndex) {
@@ -176,7 +187,7 @@
 }
 
 /**
- *
+ * {...@inheritdoc}
  */
 @Override
 public void 

svn commit: r907679 - /jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSampleResult.java

2010-02-08 Thread sebb
Author: sebb
Date: Mon Feb  8 15:10:56 2010
New Revision: 907679

URL: http://svn.apache.org/viewvc?rev=907679view=rev
Log:
Javadoc clarification

Modified:

jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSampleResult.java

Modified: 
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSampleResult.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSampleResult.java?rev=907679r1=907678r2=907679view=diff
==
--- 
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSampleResult.java
 (original)
+++ 
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSampleResult.java
 Mon Feb  8 15:10:56 2010
@@ -36,6 +36,12 @@
 
 private String method;
 
+/**
+ * The raw value of the Location: header; may be null. 
+ * This is supposed to be an absolute URL:
+ * a 
href=http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.30;RFC2616 
sec14.30/a
+ * but is often relative.
+ */
 private String redirectLocation;
 
 private String queryString = ; // never null



-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



svn commit: r907684 - /jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/sampler/TestHTTPSamplers.java

2010-02-08 Thread sebb
Author: sebb
Date: Mon Feb  8 15:17:33 2010
New Revision: 907684

URL: http://svn.apache.org/viewvc?rev=907684view=rev
Log:
Use IP address rather than name to avoid DNS queries
Add basic redirect test

Modified:

jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/sampler/TestHTTPSamplers.java

Modified: 
jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/sampler/TestHTTPSamplers.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/sampler/TestHTTPSamplers.java?rev=907684r1=907683r2=907684view=diff
==
--- 
jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/sampler/TestHTTPSamplers.java
 (original)
+++ 
jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/sampler/TestHTTPSamplers.java
 Mon Feb  8 15:17:33 2010
@@ -125,14 +125,38 @@
 assertEquals(http://www.apache.org/index.html?param1=value1;, 
config.getUrl().toString());
 }
 
+public void testRedirect() throws Exception {
+HTTPSamplerBase config = new HTTPNullSampler();
+config.setProtocol(http);
+config.setMethod(HTTPSamplerBase.GET);
+config.setDomain(192.168.0.1);
+HTTPSampleResult res = new HTTPSampleResult();
+res.sampleStart();
+res.setURL(config.getUrl());
+res.setResponseCode(301);
+res.sampleEnd();
+
+res.setRedirectLocation(./);
+config.followRedirects(res , 0);
+assertEquals(http://192.168.0.1/;, config.getUrl().toString());
+
+res.setRedirectLocation(.);
+config.followRedirects(res , 0);
+assertEquals(http://192.168.0.1/;, config.getUrl().toString());
+
+res.setRedirectLocation(../);
+config.followRedirects(res , 0);
+assertEquals(http://192.168.0.1/;, config.getUrl().toString());
+}
+
 public void testMakingUrl2() throws Exception {
 HTTPSamplerBase config = new HTTPNullSampler();
 config.setProtocol(http);
 config.setMethod(HTTPSamplerBase.GET);
 config.addArgument(param1, value1);
 config.setPath(/index.html?p1=p2);
-config.setDomain(www.apache.org);
-
assertEquals(http://www.apache.org/index.html?param1=value1p1=p2;, 
config.getUrl().toString());
+config.setDomain(192.168.0.1);
+assertEquals(http://192.168.0.1/index.html?param1=value1p1=p2;, 
config.getUrl().toString());
 }
 
 public void testMakingUrl3() throws Exception {
@@ -141,8 +165,8 @@
 config.setMethod(HTTPSamplerBase.POST);
 config.addArgument(param1, value1);
 config.setPath(/index.html?p1=p2);
-config.setDomain(www.apache.org);
-assertEquals(http://www.apache.org/index.html?p1=p2;, 
config.getUrl().toString());
+config.setDomain(192.168.0.1);
+assertEquals(http://192.168.0.1/index.html?p1=p2;, 
config.getUrl().toString());
 }
 
 // test cases for making Url, and exercise method
@@ -154,8 +178,8 @@
 config.setMethod(HTTPSamplerBase.GET);
 config.addArgument(param1, value1, =);
 config.setPath(/index.html);
-config.setDomain(www.apache.org);
-assertEquals(http://www.apache.org/index.html?param1=value1;, 
config.getUrl().toString());
+config.setDomain(192.168.0.1);
+assertEquals(http://192.168.0.1/index.html?param1=value1;, 
config.getUrl().toString());
 }
 
 public void testMakingUrl5() throws Exception {
@@ -164,8 +188,8 @@
 config.setMethod(HTTPSamplerBase.GET);
 config.addArgument(param1, , =);
 config.setPath(/index.html);
-config.setDomain(www.apache.org);
-assertEquals(http://www.apache.org/index.html?param1=;, 
config.getUrl().toString());
+config.setDomain(192.168.0.1);
+assertEquals(http://192.168.0.1/index.html?param1=;, 
config.getUrl().toString());
 }
 
 public void testMakingUrl6() throws Exception {
@@ -174,8 +198,8 @@
 config.setMethod(HTTPSamplerBase.GET);
 config.addArgument(param1, , );
 config.setPath(/index.html);
-config.setDomain(www.apache.org);
-assertEquals(http://www.apache.org/index.html?param1;, 
config.getUrl().toString());
+config.setDomain(192.168.0.1);
+assertEquals(http://192.168.0.1/index.html?param1;, 
config.getUrl().toString());
 }
 
 // test cases for making Url, and exercise method
@@ -187,8 +211,8 @@
 config.setMethod(HTTPSamplerBase.GET);
 config.parseArguments(param1=value1);
 config.setPath(/index.html);
-config.setDomain

svn commit: r907839 - in /jakarta/jmeter/trunk: bin/testfiles/ src/components/org/apache/jmeter/config/ src/core/org/apache/jmeter/services/ test/src/org/apache/jmeter/config/ xdocs/ xdocs/usermanual/

2010-02-08 Thread sebb
Author: sebb
Date: Mon Feb  8 23:05:38 2010
New Revision: 907839

URL: http://svn.apache.org/viewvc?rev=907839view=rev
Log:
Bug 46790 - CSV Data Set Config should be able to parse CSV headers

Added:
jakarta/jmeter/trunk/bin/testfiles/testheader.csv
Modified:
jakarta/jmeter/trunk/src/components/org/apache/jmeter/config/CSVDataSet.java
jakarta/jmeter/trunk/src/core/org/apache/jmeter/services/FileServer.java
jakarta/jmeter/trunk/test/src/org/apache/jmeter/config/TestCVSDataSet.java
jakarta/jmeter/trunk/xdocs/changes.xml
jakarta/jmeter/trunk/xdocs/usermanual/component_reference.xml

Added: jakarta/jmeter/trunk/bin/testfiles/testheader.csv
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/bin/testfiles/testheader.csv?rev=907839view=auto
==
--- jakarta/jmeter/trunk/bin/testfiles/testheader.csv (added)
+++ jakarta/jmeter/trunk/bin/testfiles/testheader.csv Mon Feb  8 23:05:38 2010
@@ -0,0 +1,5 @@
+A|B|C|D|1
+a1|b1|c1|d1
+a2|b2|c2|d2
+a3|b3|c3|d3
+a4|b4|c4|d4
\ No newline at end of file

Modified: 
jakarta/jmeter/trunk/src/components/org/apache/jmeter/config/CSVDataSet.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/components/org/apache/jmeter/config/CSVDataSet.java?rev=907839r1=907838r2=907839view=diff
==
--- 
jakarta/jmeter/trunk/src/components/org/apache/jmeter/config/CSVDataSet.java 
(original)
+++ 
jakarta/jmeter/trunk/src/components/org/apache/jmeter/config/CSVDataSet.java 
Mon Feb  8 23:05:38 2010
@@ -91,10 +91,9 @@
 recycle = true;
 return this;
 }
-/*
- * (non-Javadoc)
- *
- * @see 
org.apache.jmeter.engine.event.LoopIterationListener#iterationStart(org.apache.jmeter.engine.event.LoopIterationEvent)
+
+/**
+ * {...@inheritdoc}
  */
 public void iterationStart(LoopIterationEvent iterEvent) {
 FileServer server = FileServer.getFileServer();
@@ -117,8 +116,18 @@
 alias = _fileName+@+mode; // user-specified key
 break;
 }
-server.reserveFile(_fileName, getFileEncoding(), alias);
-vars = JOrphanUtils.split(getVariableNames(), ,); // $NON-NLS-1$
+final String names = getVariableNames();
+if (names == null || names.length()==0) {
+String header = server.reserveFile(_fileName, 
getFileEncoding(), alias, true);
+try {
+vars = CSVSaveService.csvSplitString(header, 
getDelimiter().charAt(0));
+} catch (IOException e) {
+log.warn(Could not split CSV header line,e);
+}
+} else {
+server.reserveFile(_fileName, getFileEncoding(), alias);
+vars = JOrphanUtils.split(names, ,); // $NON-NLS-1$  
  
+}
 }
 try {
 String delim = getDelimiter();

Modified: 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/services/FileServer.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/services/FileServer.java?rev=907839r1=907838r2=907839view=diff
==
--- jakarta/jmeter/trunk/src/core/org/apache/jmeter/services/FileServer.java 
(original)
+++ jakarta/jmeter/trunk/src/core/org/apache/jmeter/services/FileServer.java 
Mon Feb  8 23:05:38 2010
@@ -118,7 +118,7 @@
  * @param charsetName - the character set encoding to use for the file 
(may be null)
  */
 public synchronized void reserveFile(String filename, String charsetName) {
-reserveFile(filename, charsetName, filename);
+reserveFile(filename, charsetName, filename, false);
 }
 
 /**
@@ -130,23 +130,45 @@
  * @param alias - the name to be used to access the object (must not be 
null)
  */
 public synchronized void reserveFile(String filename, String charsetName, 
String alias) {
+reserveFile(filename, charsetName, alias, false);
+}
+
+/**
+ * Creates an association between a filename and a File inputOutputObject,
+ * and stores it for later use - unless it is already stored.
+ *
+ * @param filename - relative (to base) or absolute file name (must not be 
null)
+ * @param charsetName - the character set encoding to use for the file 
(may be null)
+ * @param alias - the name to be used to access the object (must not be 
null)
+ * @param hasHeader true if the file has a header line describing the 
contents
+ */
+public synchronized String reserveFile(String filename, String 
charsetName, String alias, boolean hasHeader) {
 if (filename == null){
 throw new IllegalArgumentException(Filename must not be null);
 }
 if (alias == null){
 throw new

svn commit: r907847 - in /jakarta/jmeter/trunk: src/protocol/http/org/apache/jmeter/protocol/http/proxy/Proxy.java xdocs/usermanual/component_reference.xml

2010-02-08 Thread sebb
Author: sebb
Date: Mon Feb  8 23:50:02 2010
New Revision: 907847

URL: http://svn.apache.org/viewvc?rev=907847view=rev
Log:
Bug 47622 - dummy JMeter certificate resides in the bin directory
Document the properties

Modified:

jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/Proxy.java
jakarta/jmeter/trunk/xdocs/usermanual/component_reference.xml

Modified: 
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/Proxy.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/Proxy.java?rev=907847r1=907846r2=907847view=diff
==
--- 
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/Proxy.java
 (original)
+++ 
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/Proxy.java
 Mon Feb  8 23:50:02 2010
@@ -97,10 +97,12 @@
 
 // Proxy configuration SSL
 private static final String CERT_DIRECTORY =
-JMeterUtils.getPropDefault(proxy.cert.directory, .); // 
$NON-NLS-1$ $NON-NLS-2$
+JMeterUtils.getPropDefault(proxy.cert.directory, 
JMeterUtils.getJMeterBinDir()); // $NON-NLS-1$
 
+private static final String CERT_FILE_DEFAULT = proxyserver.jks;// 
$NON-NLS-1$
+
 private static final String CERT_FILE =
-JMeterUtils.getPropDefault(proxy.cert.file, proxyserver.jks); // 
$NON-NLS-1$ $NON-NLS-2$
+JMeterUtils.getPropDefault(proxy.cert.file, CERT_FILE_DEFAULT); // 
$NON-NLS-1$
 
 private static final char[] KEYSTORE_PASSWORD =
 JMeterUtils.getPropDefault(proxy.cert.keystorepass, 
password).toCharArray(); // $NON-NLS-1$ $NON-NLS-2$

Modified: jakarta/jmeter/trunk/xdocs/usermanual/component_reference.xml
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/xdocs/usermanual/component_reference.xml?rev=907847r1=907846r2=907847view=diff
==
--- jakarta/jmeter/trunk/xdocs/usermanual/component_reference.xml (original)
+++ jakarta/jmeter/trunk/xdocs/usermanual/component_reference.xml Mon Feb  8 
23:50:02 2010
@@ -4504,6 +4504,18 @@
 You will need to accept the certificate in order to allow the JMeter Proxy to 
intercept the SSL traffic in order to
 record it. You should only accept the certificate temporarily.
 /p
+p
+The following properties can be used to change the certificate that is used:
+ul
+liproxy.cert.directory - the directory in which to find the certificate 
(default = JMeter bin/)/li
+liproxy.cert.file - name of the keystore file (default 
proxyserver.jks)/li
+liproxy.cert.keystorepass - keystore password (default password)/li
+liproxy.cert.keypassword - certificate key password (default password)/li
+liproxy.cert.type - the certificate type (default JKS)/li
+liproxy.cert.factory - the factory (default SunX509)/li
+liproxy.ssl.protocol - the protocol to be used (default SSLv3)/li
+/ul
+/p
 note
 If your browser currently uses a proxy (e.g. a company intranet may route all 
external requests via a proxy),
 then you need to a href=get-started.html#proxy_servertell JMeter to use 
that proxy/a before starting JMeter, 



-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



svn commit: r907850 - /jakarta/jmeter/trunk/test/src/org/apache/jmeter/config/TestCVSDataSet.java

2010-02-08 Thread sebb
Author: sebb
Date: Tue Feb  9 00:04:35 2010
New Revision: 907850

URL: http://svn.apache.org/viewvc?rev=907850view=rev
Log:
Oops! forgot to change the test case when the data file was changed

Modified:
jakarta/jmeter/trunk/test/src/org/apache/jmeter/config/TestCVSDataSet.java

Modified: 
jakarta/jmeter/trunk/test/src/org/apache/jmeter/config/TestCVSDataSet.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/test/src/org/apache/jmeter/config/TestCVSDataSet.java?rev=907850r1=907849r2=907850view=diff
==
--- jakarta/jmeter/trunk/test/src/org/apache/jmeter/config/TestCVSDataSet.java 
(original)
+++ jakarta/jmeter/trunk/test/src/org/apache/jmeter/config/TestCVSDataSet.java 
Tue Feb  9 00:04:35 2010
@@ -104,13 +104,13 @@
 assertEquals(a1,threadVars.get(A));
 assertEquals(b1,threadVars.get(B));
 assertEquals(c1,threadVars.get(C));
-assertEquals(d1,threadVars.get(D 1));
+assertEquals(d1,threadVars.get(D|1));
 csv.iterationStart(null);
 assertNull(threadVars.get(a));
 assertEquals(a2,threadVars.get(A));
 assertEquals(b2,threadVars.get(B));
 assertEquals(c2,threadVars.get(C));
-assertEquals(d2,threadVars.get(D 1));
+assertEquals(d2,threadVars.get(D|1));
 }
 
 private CSVDataSet initCSV(){



-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



Re: TCPClient classname from TCP config not applied

2010-02-08 Thread sebb
On 23/12/2009, Andrey Pohilko a...@fininfor.ru wrote:
 Alright!

  What should I do to report this unknown bug to developers?


Best to file a Bugzilla request - please see:

https://issues.apache.org/bugzilla/

  С уважением,
  Андрей Похилько

 -Original Message-
  From: sebb [mailto:seb...@gmail.com]
  Sent: Wednesday, December 23, 2009 1:20 AM
  To: JMeter Developers List
  Subject: Re: TCPClient classname from TCP config not applied

  2009/12/22 Andrey Pohilko a...@fininfor.ru:
   Hello!
  
  
  
   I wrote my own TCPClient class, it successfully working when I fill
   TCPClient classname field in separate TCP Samplers. But it is not
  applied
   when I fill the same field in TCP Sampler Config in test plan. All other
   options from config (hostname, port, etc) works fine, but classname is
  not.
  
  
  
   Is that a feature, known or unknown bug?
  

  The last option ;-)

  
   Thanks,
  
   Andrey
  
  


 -
  To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
  For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org


  -
  To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
  For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



svn commit: r907438 - in /jakarta/jmeter/trunk: docs/images/screenshots/ docs/images/screenshots/webtest/ xdocs/images/screenshots/ xdocs/images/screenshots/webtest/ xdocs/usermanual/

2010-02-07 Thread sebb
Author: sebb
Date: Sun Feb  7 16:04:14 2010
New Revision: 907438

URL: http://svn.apache.org/viewvc?rev=907438view=rev
Log:
Updating docs with new images etc.

Added:
jakarta/jmeter/trunk/docs/images/screenshots/http-request.png   (with props)
jakarta/jmeter/trunk/xdocs/images/screenshots/http-request.png   (with 
props)
Removed:
jakarta/jmeter/trunk/docs/images/screenshots/webtest/http-request.png
jakarta/jmeter/trunk/xdocs/images/screenshots/webtest/http-request.png
Modified:
jakarta/jmeter/trunk/docs/images/screenshots/proxy_control.png
jakarta/jmeter/trunk/docs/images/screenshots/regex_extractor.png
jakarta/jmeter/trunk/docs/images/screenshots/webtest/http-defaults1.png
jakarta/jmeter/trunk/docs/images/screenshots/webtest/http-defaults2.png
jakarta/jmeter/trunk/docs/images/screenshots/webtest/http-request1.png
jakarta/jmeter/trunk/docs/images/screenshots/webtest/http-request2.png
jakarta/jmeter/trunk/docs/images/screenshots/webtest/http_login.png
jakarta/jmeter/trunk/xdocs/images/screenshots/proxy_control.png
jakarta/jmeter/trunk/xdocs/images/screenshots/regex_extractor.png
jakarta/jmeter/trunk/xdocs/images/screenshots/webtest/http-defaults1.png
jakarta/jmeter/trunk/xdocs/images/screenshots/webtest/http-defaults2.png
jakarta/jmeter/trunk/xdocs/images/screenshots/webtest/http-request1.png
jakarta/jmeter/trunk/xdocs/images/screenshots/webtest/http-request2.png
jakarta/jmeter/trunk/xdocs/images/screenshots/webtest/http_login.png
jakarta/jmeter/trunk/xdocs/usermanual/component_reference.xml

Added: jakarta/jmeter/trunk/docs/images/screenshots/http-request.png
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/docs/images/screenshots/http-request.png?rev=907438view=auto
==
Binary file - no diff available.

Propchange: jakarta/jmeter/trunk/docs/images/screenshots/http-request.png
--
svn:mime-type = image/png

Modified: jakarta/jmeter/trunk/docs/images/screenshots/proxy_control.png
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/docs/images/screenshots/proxy_control.png?rev=907438r1=907437r2=907438view=diff
==
Binary files - no diff available.

Modified: jakarta/jmeter/trunk/docs/images/screenshots/regex_extractor.png
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/docs/images/screenshots/regex_extractor.png?rev=907438r1=907437r2=907438view=diff
==
Binary files - no diff available.

Modified: 
jakarta/jmeter/trunk/docs/images/screenshots/webtest/http-defaults1.png
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/docs/images/screenshots/webtest/http-defaults1.png?rev=907438r1=907437r2=907438view=diff
==
Binary files - no diff available.

Modified: 
jakarta/jmeter/trunk/docs/images/screenshots/webtest/http-defaults2.png
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/docs/images/screenshots/webtest/http-defaults2.png?rev=907438r1=907437r2=907438view=diff
==
Binary files - no diff available.

Modified: jakarta/jmeter/trunk/docs/images/screenshots/webtest/http-request1.png
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/docs/images/screenshots/webtest/http-request1.png?rev=907438r1=907437r2=907438view=diff
==
Binary files - no diff available.

Modified: jakarta/jmeter/trunk/docs/images/screenshots/webtest/http-request2.png
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/docs/images/screenshots/webtest/http-request2.png?rev=907438r1=907437r2=907438view=diff
==
Binary files - no diff available.

Modified: jakarta/jmeter/trunk/docs/images/screenshots/webtest/http_login.png
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/docs/images/screenshots/webtest/http_login.png?rev=907438r1=907437r2=907438view=diff
==
Binary files - no diff available.

Added: jakarta/jmeter/trunk/xdocs/images/screenshots/http-request.png
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/xdocs/images/screenshots/http-request.png?rev=907438view=auto
==
Binary file - no diff available.

Propchange: jakarta/jmeter/trunk/xdocs/images/screenshots/http-request.png
--
svn:mime-type = image/png

Modified: jakarta/jmeter/trunk/xdocs/images/screenshots/proxy_control.png
URL: 
http

svn commit: r907510 - in /jakarta/jmeter/trunk: src/components/org/apache/jmeter/extractor/RegexExtractor.java src/components/org/apache/jmeter/extractor/gui/RegexExtractorGui.java xdocs/changes.xml x

2010-02-07 Thread sebb
Author: sebb
Date: Sun Feb  7 23:16:18 2010
New Revision: 907510

URL: http://svn.apache.org/viewvc?rev=907510view=rev
Log:
Regex Extractor can now be applied to a variable

Modified:

jakarta/jmeter/trunk/src/components/org/apache/jmeter/extractor/RegexExtractor.java

jakarta/jmeter/trunk/src/components/org/apache/jmeter/extractor/gui/RegexExtractorGui.java
jakarta/jmeter/trunk/xdocs/changes.xml
jakarta/jmeter/trunk/xdocs/usermanual/component_reference.xml

Modified: 
jakarta/jmeter/trunk/src/components/org/apache/jmeter/extractor/RegexExtractor.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/components/org/apache/jmeter/extractor/RegexExtractor.java?rev=907510r1=907509r2=907510view=diff
==
--- 
jakarta/jmeter/trunk/src/components/org/apache/jmeter/extractor/RegexExtractor.java
 (original)
+++ 
jakarta/jmeter/trunk/src/components/org/apache/jmeter/extractor/RegexExtractor.java
 Sun Feb  7 23:16:18 2010
@@ -111,7 +111,7 @@
 
 String regex = getRegex();
 try {
-ListMatchResult matches = processMatches(regex, previousResult, 
matchNumber);
+ListMatchResult matches = processMatches(regex, previousResult, 
matchNumber, vars);
 int prevCount = 0;
 String prevString = vars.get(refName + REF_MATCH_NR);
 if (prevString != null) {
@@ -176,9 +176,7 @@
return inputString;
 }
 
-private ListMatchResult processMatches(String regex, SampleResult 
result, int matchNumber) {
-ListSampleResult sampleList = getSampleList(result);
-
+private ListMatchResult processMatches(String regex, SampleResult 
result, int matchNumber, JMeterVariables vars) {
 if (log.isDebugEnabled()) {
 log.debug(Regex =  + regex);
 }
@@ -188,23 +186,38 @@
 ListMatchResult matches = new ArrayListMatchResult();
 int found = 0;
 
-for (SampleResult sr : sampleList) {
-String inputString = getInputString(sr);
-PatternMatcherInput input = new PatternMatcherInput(inputString);
-while (matchNumber =0 || found != matchNumber) {
-if (matcher.contains(input, pattern)) {
-log.debug(RegexExtractor: Match found!);
-matches.add(matcher.getMatch());
-found++;
-} else {
+if (isScopeVariable()){
+String inputString=vars.get(getVariableName());
+matchStrings(matchNumber, matcher, pattern, matches, found,
+inputString);
+} else {
+ListSampleResult sampleList = getSampleList(result);
+for (SampleResult sr : sampleList) {
+String inputString = getInputString(sr);
+found = matchStrings(matchNumber, matcher, pattern, matches, 
found,
+inputString);
+if (matchNumber  0  found == matchNumber){// no need to 
process further
 break;
 }
 }
-if (matchNumber  0  found == matchNumber){// no need to process 
further
+}
+return matches;
+}
+
+private int matchStrings(int matchNumber, Perl5Matcher matcher,
+Pattern pattern, ListMatchResult matches, int found,
+String inputString) {
+PatternMatcherInput input = new PatternMatcherInput(inputString);
+while (matchNumber =0 || found != matchNumber) {
+if (matcher.contains(input, pattern)) {
+log.debug(RegexExtractor: Match found!);
+matches.add(matcher.getMatch());
+found++;
+} else {
 break;
 }
 }
-return matches;
+return found;
 }
 
 /**

Modified: 
jakarta/jmeter/trunk/src/components/org/apache/jmeter/extractor/gui/RegexExtractorGui.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/components/org/apache/jmeter/extractor/gui/RegexExtractorGui.java?rev=907510r1=907509r2=907510view=diff
==
--- 
jakarta/jmeter/trunk/src/components/org/apache/jmeter/extractor/gui/RegexExtractorGui.java
 (original)
+++ 
jakarta/jmeter/trunk/src/components/org/apache/jmeter/extractor/gui/RegexExtractorGui.java
 Sun Feb  7 23:16:18 2010
@@ -146,7 +146,7 @@
 
 Box box = Box.createVerticalBox();
 box.add(makeTitlePanel());
-box.add(createScopePanel());
+box.add(createScopePanel(true));
 box.add(makeSourcePanel());
 add(box, BorderLayout.NORTH);
 add(makeParameterPanel(), BorderLayout.CENTER);

Modified: jakarta/jmeter/trunk/xdocs/changes.xml
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/xdocs/changes.xml?rev=907510r1=907509r2=907510view=diff

svn commit: r907209 - in /jakarta/jmeter/trunk/bin: mirror-server.cmd mirror-server.sh shutdown.cmd shutdown.sh stoptest.cmd stoptest.sh

2010-02-06 Thread sebb
Author: sebb
Date: Sat Feb  6 13:19:50 2010
New Revision: 907209

URL: http://svn.apache.org/viewvc?rev=907209view=rev
Log:
Add comments

Modified:
jakarta/jmeter/trunk/bin/mirror-server.cmd
jakarta/jmeter/trunk/bin/mirror-server.sh
jakarta/jmeter/trunk/bin/shutdown.cmd
jakarta/jmeter/trunk/bin/shutdown.sh
jakarta/jmeter/trunk/bin/stoptest.cmd
jakarta/jmeter/trunk/bin/stoptest.sh

Modified: jakarta/jmeter/trunk/bin/mirror-server.cmd
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/bin/mirror-server.cmd?rev=907209r1=907208r2=907209view=diff
==
--- jakarta/jmeter/trunk/bin/mirror-server.cmd (original)
+++ jakarta/jmeter/trunk/bin/mirror-server.cmd Sat Feb  6 13:19:50 2010
@@ -15,6 +15,9 @@
 rem   See the License for the specific language governing permissions and
 rem   limitations under the License.
 
+rem   Run the JMeter mirror server in non-GUI mode
+rem   P1 = port to use (default 8080)
+
 setlocal
 
 cd /D %~dp0

Modified: jakarta/jmeter/trunk/bin/mirror-server.sh
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/bin/mirror-server.sh?rev=907209r1=907208r2=907209view=diff
==
--- jakarta/jmeter/trunk/bin/mirror-server.sh (original)
+++ jakarta/jmeter/trunk/bin/mirror-server.sh Sat Feb  6 13:19:50 2010
@@ -15,6 +15,9 @@
 ##   See the License for the specific language governing permissions and
 ##   limitations under the License.
 
+#   Run the JMeter mirror server in non-GUI mode
+#   P1 = port to use (default 8080)
+
 cd `dirname $0`
 
 
CP=../lib/ext/ApacheJMeter_http.jar;../lib/ext/ApacheJMeter_core.jar;../lib/jorphan.jar

Modified: jakarta/jmeter/trunk/bin/shutdown.cmd
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/bin/shutdown.cmd?rev=907209r1=907208r2=907209view=diff
==
--- jakarta/jmeter/trunk/bin/shutdown.cmd (original)
+++ jakarta/jmeter/trunk/bin/shutdown.cmd Sat Feb  6 13:19:50 2010
@@ -15,7 +15,9 @@
 rem   See the License for the specific language governing permissions and
 rem   limitations under the License.
 
-rem   Run the Shutdown client
+rem   Run the Shutdown client to stop a non-GUI instance gracefully
+
+rem   P1 = command port for JMeter instance (defaults to 4445)
 
 java -cp %~dp0ApacheJMeter.jar org.apache.jmeter.util.ShutdownClient Shutdown 
%*
 pause 
\ No newline at end of file

Modified: jakarta/jmeter/trunk/bin/shutdown.sh
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/bin/shutdown.sh?rev=907209r1=907208r2=907209view=diff
==
--- jakarta/jmeter/trunk/bin/shutdown.sh (original)
+++ jakarta/jmeter/trunk/bin/shutdown.sh Sat Feb  6 13:19:50 2010
@@ -15,7 +15,9 @@
 ##   See the License for the specific language governing permissions and
 ##   limitations under the License.
 
-# Run the JMeter shutdown client
+#   Run the Shutdown client to stop a non-GUI instance gracefully
+
+#   P1 = command port for JMeter instance (defaults to 4445)
 
 DIRNAME=`dirname $0`
 

Modified: jakarta/jmeter/trunk/bin/stoptest.cmd
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/bin/stoptest.cmd?rev=907209r1=907208r2=907209view=diff
==
--- jakarta/jmeter/trunk/bin/stoptest.cmd (original)
+++ jakarta/jmeter/trunk/bin/stoptest.cmd Sat Feb  6 13:19:50 2010
@@ -15,7 +15,9 @@
 rem   See the License for the specific language governing permissions and
 rem   limitations under the License.
 
-rem   Run the Shutdown client
+rem   Run the Shutdown client to stop a non-GUI instance abruptly
+
+rem   P1 = command port for JMeter instance (defaults to 4445)
 
 java -cp %~dp0ApacheJMeter.jar org.apache.jmeter.util.ShutdownClient 
StopTestNow %*
 pause 
\ No newline at end of file

Modified: jakarta/jmeter/trunk/bin/stoptest.sh
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/bin/stoptest.sh?rev=907209r1=907208r2=907209view=diff
==
--- jakarta/jmeter/trunk/bin/stoptest.sh (original)
+++ jakarta/jmeter/trunk/bin/stoptest.sh Sat Feb  6 13:19:50 2010
@@ -15,7 +15,9 @@
 ##   See the License for the specific language governing permissions and
 ##   limitations under the License.
 
-# Run the JMeter shutdown client
+#   Run the Shutdown client to stop a non-GUI instance abruptly
+
+#   P1 = command port for JMeter instance (defaults to 4445)
 
 DIRNAME=`dirname $0`
 



-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



svn commit: r907212 - in /jakarta/jmeter/trunk: docs/images/screenshots/ docs/images/screenshots/webtest/ xdocs/images/screenshots/ xdocs/images/screenshots/webtest/ xdocs/usermanual/

2010-02-06 Thread sebb
Author: sebb
Date: Sat Feb  6 13:26:56 2010
New Revision: 907212

URL: http://svn.apache.org/viewvc?rev=907212view=rev
Log:
Updating docs with new images etc.

Added:
jakarta/jmeter/trunk/docs/images/screenshots/webtest/http_login.png   (with 
props)
jakarta/jmeter/trunk/xdocs/images/screenshots/webtest/http_login.png   
(with props)
Removed:
jakarta/jmeter/trunk/docs/images/screenshots/http_login.png
jakarta/jmeter/trunk/xdocs/images/screenshots/http_login.png
Modified:
jakarta/jmeter/trunk/docs/images/screenshots/webtest/http-defaults1.png
jakarta/jmeter/trunk/docs/images/screenshots/webtest/http-defaults2.png
jakarta/jmeter/trunk/docs/images/screenshots/webtest/http-request1.png
jakarta/jmeter/trunk/docs/images/screenshots/webtest/http-request2.png
jakarta/jmeter/trunk/docs/images/screenshots/webtest/threadgroup.png
jakarta/jmeter/trunk/docs/images/screenshots/webtest/threadgroup2.png
jakarta/jmeter/trunk/xdocs/images/screenshots/webtest/http-defaults1.png
jakarta/jmeter/trunk/xdocs/images/screenshots/webtest/http-defaults2.png
jakarta/jmeter/trunk/xdocs/images/screenshots/webtest/http-request1.png
jakarta/jmeter/trunk/xdocs/images/screenshots/webtest/http-request2.png
jakarta/jmeter/trunk/xdocs/images/screenshots/webtest/threadgroup.png
jakarta/jmeter/trunk/xdocs/images/screenshots/webtest/threadgroup2.png
jakarta/jmeter/trunk/xdocs/usermanual/build-web-test-plan.xml
jakarta/jmeter/trunk/xdocs/usermanual/get-started.xml
jakarta/jmeter/trunk/xdocs/usermanual/test_plan.xml

Modified: 
jakarta/jmeter/trunk/docs/images/screenshots/webtest/http-defaults1.png
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/docs/images/screenshots/webtest/http-defaults1.png?rev=907212r1=907211r2=907212view=diff
==
Binary files - no diff available.

Modified: 
jakarta/jmeter/trunk/docs/images/screenshots/webtest/http-defaults2.png
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/docs/images/screenshots/webtest/http-defaults2.png?rev=907212r1=907211r2=907212view=diff
==
Binary files - no diff available.

Modified: jakarta/jmeter/trunk/docs/images/screenshots/webtest/http-request1.png
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/docs/images/screenshots/webtest/http-request1.png?rev=907212r1=907211r2=907212view=diff
==
Binary files - no diff available.

Modified: jakarta/jmeter/trunk/docs/images/screenshots/webtest/http-request2.png
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/docs/images/screenshots/webtest/http-request2.png?rev=907212r1=907211r2=907212view=diff
==
Binary files - no diff available.

Added: jakarta/jmeter/trunk/docs/images/screenshots/webtest/http_login.png
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/docs/images/screenshots/webtest/http_login.png?rev=907212view=auto
==
Binary file - no diff available.

Propchange: jakarta/jmeter/trunk/docs/images/screenshots/webtest/http_login.png
--
svn:mime-type = image/png

Modified: jakarta/jmeter/trunk/docs/images/screenshots/webtest/threadgroup.png
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/docs/images/screenshots/webtest/threadgroup.png?rev=907212r1=907211r2=907212view=diff
==
Binary files - no diff available.

Modified: jakarta/jmeter/trunk/docs/images/screenshots/webtest/threadgroup2.png
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/docs/images/screenshots/webtest/threadgroup2.png?rev=907212r1=907211r2=907212view=diff
==
Binary files - no diff available.

Modified: 
jakarta/jmeter/trunk/xdocs/images/screenshots/webtest/http-defaults1.png
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/xdocs/images/screenshots/webtest/http-defaults1.png?rev=907212r1=907211r2=907212view=diff
==
Binary files - no diff available.

Modified: 
jakarta/jmeter/trunk/xdocs/images/screenshots/webtest/http-defaults2.png
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/xdocs/images/screenshots/webtest/http-defaults2.png?rev=907212r1=907211r2=907212view=diff
==
Binary files - no diff available.

Modified: 
jakarta/jmeter/trunk/xdocs/images/screenshots/webtest/http-request1.png
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/xdocs/images/screenshots/webtest/http-request1.png?rev

svn commit: r907216 - in /jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/config/gui: MultipartUrlConfigGui.java UrlConfigGui.java

2010-02-06 Thread sebb
Author: sebb
Date: Sat Feb  6 13:55:15 2010
New Revision: 907216

URL: http://svn.apache.org/viewvc?rev=907216view=rev
Log:
Make Follow Redirects the default (better for cookie tracking)
Easier selection of redirect options
Move Proxy panel lower down screen

Modified:

jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/config/gui/MultipartUrlConfigGui.java

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

Modified: 
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/config/gui/MultipartUrlConfigGui.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/config/gui/MultipartUrlConfigGui.java?rev=907216r1=907215r2=907216view=diff
==
--- 
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/config/gui/MultipartUrlConfigGui.java
 (original)
+++ 
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/config/gui/MultipartUrlConfigGui.java
 Sat Feb  6 13:55:15 2010
@@ -82,6 +82,7 @@
 
 this.add(getWebServerTimeoutPanel(), BorderLayout.NORTH);
 this.add(webRequestPanel, BorderLayout.CENTER);
+this.add(getProxyServerPanel(), BorderLayout.SOUTH);
 }
 
 private JPanel getHTTPFileArgsPanel() {

Modified: 
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/config/gui/UrlConfigGui.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/config/gui/UrlConfigGui.java?rev=907216r1=907215r2=907216view=diff
==
--- 
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/config/gui/UrlConfigGui.java
 (original)
+++ 
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/config/gui/UrlConfigGui.java
 Sat Feb  6 13:55:15 2010
@@ -106,8 +106,8 @@
 public void clear() {
 domain.setText(); // $NON-NLS-1$
 if (notConfigOnly){
-followRedirects.setSelected(false);
-autoRedirects.setSelected(true);
+followRedirects.setSelected(true);
+autoRedirects.setSelected(false);
 method.setText(HTTPSamplerBase.DEFAULT_METHOD);
 useKeepAlive.setSelected(true);
 useMultipartForPost.setSelected(false);
@@ -221,6 +221,7 @@
 
 this.add(getWebServerTimeoutPanel(), BorderLayout.NORTH);
 this.add(webRequestPanel, BorderLayout.CENTER);
+this.add(getProxyServerPanel(), BorderLayout.SOUTH);
 }
 
 /**
@@ -250,6 +251,17 @@
 webServerTimeoutPanel.add(webServerPanel, BorderLayout.CENTER);
 webServerTimeoutPanel.add(timeOut, BorderLayout.EAST);
 
+JPanel bigPanel = new VerticalPanel();
+bigPanel.add(webServerTimeoutPanel);
+return bigPanel;
+}
+
+/**
+ * Create a panel containing the proxy server details
+ * 
+ * @return the panel
+ */
+protected final JPanel getProxyServerPanel(){
 JPanel proxyServer = new HorizontalPanel();
 proxyServer.add(getProxyHostPanel(), BorderLayout.CENTER);
 proxyServer.add(getProxyPortPanel(), BorderLayout.EAST);
@@ -264,10 +276,7 @@
 proxyServerPanel.add(proxyServer, BorderLayout.CENTER);
 proxyServerPanel.add(proxyLogin, BorderLayout.EAST);
 
-JPanel bigPanel = new VerticalPanel();
-bigPanel.add(webServerTimeoutPanel);
-bigPanel.add(proxyServerPanel);
-return bigPanel;
+return proxyServerPanel;
 }
 
 private JPanel getPortPanel() {
@@ -385,11 +394,12 @@
 
 if (notConfigOnly){
 followRedirects = new 
JCheckBox(JMeterUtils.getResString(follow_redirects)); // $NON-NLS-1$
-followRedirects.setSelected(false);
+followRedirects.setSelected(true);
+followRedirects.addChangeListener(this);
 
 autoRedirects = new 
JCheckBox(JMeterUtils.getResString(follow_redirects_auto)); //$NON-NLS-1$
 autoRedirects.addChangeListener(this);
-autoRedirects.setSelected(true);// Default changed in 2.3
+autoRedirects.setSelected(false);// Default changed in 2.3 and 
again in 2.4
 
 useKeepAlive = new 
JCheckBox(JMeterUtils.getResString(use_keepalive)); // $NON-NLS-1$
 useKeepAlive.setSelected(true);
@@ -457,13 +467,16 @@
 return argsPanel;
 }
 
-// Disable follow redirects if Autoredirect is selected
+// autoRedirects and followRedirects cannot both be selected
 public void stateChanged(ChangeEvent e) {
 if (e.getSource() == autoRedirects){
 if (autoRedirects.isSelected()) {
-followRedirects.setEnabled(false);
-} else {
-followRedirects.setEnabled(true

svn commit: r907218 - /jakarta/jmeter/trunk/xdocs/changes.xml

2010-02-06 Thread sebb
Author: sebb
Date: Sat Feb  6 13:59:34 2010
New Revision: 907218

URL: http://svn.apache.org/viewvc?rev=907218view=rev
Log:
Make Follow Redirects the default (better for cookie tracking)

Modified:
jakarta/jmeter/trunk/xdocs/changes.xml

Modified: jakarta/jmeter/trunk/xdocs/changes.xml
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/xdocs/changes.xml?rev=907218r1=907217r2=907218view=diff
==
--- jakarta/jmeter/trunk/xdocs/changes.xml (original)
+++ jakarta/jmeter/trunk/xdocs/changes.xml Sat Feb  6 13:59:34 2010
@@ -60,6 +60,12 @@
 h2Incompatible changes/h2
 
 p
+HTTP Redirect now defaults to Follow Redirects rather than Redirect 
Automatically.
+This is to enable JMeter to track cookies that may be sent during redirects.
+This does not affect existing test plans; it only affects the default for new 
HTTP Samplers.
+/p
+
+p
 The Avalon file format for JMX and JTL files is no longer supported.
 Any such files will need to be converted by reading them in JMeter 2.3.4 and 
resaving them.
 /p



-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



svn commit: r905633 - /jakarta/jmeter/trunk/src/core/org/apache/jmeter/save/SaveService.java

2010-02-02 Thread sebb
Author: sebb
Date: Tue Feb  2 13:48:16 2010
New Revision: 905633

URL: http://svn.apache.org/viewvc?rev=905633view=rev
Log:
Fix expected version of saveservice.properties

Modified:
jakarta/jmeter/trunk/src/core/org/apache/jmeter/save/SaveService.java

Modified: jakarta/jmeter/trunk/src/core/org/apache/jmeter/save/SaveService.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/save/SaveService.java?rev=905633r1=905632r2=905633view=diff
==
--- jakarta/jmeter/trunk/src/core/org/apache/jmeter/save/SaveService.java 
(original)
+++ jakarta/jmeter/trunk/src/core/org/apache/jmeter/save/SaveService.java Tue 
Feb  2 13:48:16 2010
@@ -166,7 +166,7 @@
 
 // Internal information only
 private static String fileVersion = ; // read from properties file// 
$NON-NLS-1$
-private static final String FILEVERSION = 836188; // Expected value 
$NON-NLS-1$
+private static final String FILEVERSION = 905484; // Expected value 
$NON-NLS-1$
 private static String fileEncoding = ; // read from properties file// 
$NON-NLS-1$
 
 static {



-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



svn commit: r905832 - in /jakarta/jmeter/trunk: docs/images/screenshots/ docs/images/screenshots/assertion/ src/components/org/apache/jmeter/assertions/ src/components/org/apache/jmeter/assertions/gui

2010-02-02 Thread sebb
Author: sebb
Date: Tue Feb  2 23:09:53 2010
New Revision: 905832

URL: http://svn.apache.org/viewvc?rev=905832view=rev
Log:
Response Assertion and Size Assertion can now be applied to a JMeter variable

Added:

jakarta/jmeter/trunk/docs/images/screenshots/assertion/assertionscopevar.png   
(with props)

jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/AbstractScopedJMeterGuiComponent.java
   (with props)

jakarta/jmeter/trunk/xdocs/images/screenshots/assertion/assertionscopevar.png   
(with props)
Modified:
jakarta/jmeter/trunk/docs/images/screenshots/assertion/assertion.png
jakarta/jmeter/trunk/docs/images/screenshots/regex_extractor.png
jakarta/jmeter/trunk/docs/images/screenshots/size_assertion.png

jakarta/jmeter/trunk/src/components/org/apache/jmeter/assertions/ResponseAssertion.java

jakarta/jmeter/trunk/src/components/org/apache/jmeter/assertions/SizeAssertion.java

jakarta/jmeter/trunk/src/components/org/apache/jmeter/assertions/gui/AssertionGui.java

jakarta/jmeter/trunk/src/components/org/apache/jmeter/assertions/gui/SizeAssertionGui.java

jakarta/jmeter/trunk/src/core/org/apache/jmeter/assertions/gui/AbstractAssertionGui.java

jakarta/jmeter/trunk/src/core/org/apache/jmeter/processor/gui/AbstractPostProcessorGui.java

jakarta/jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties

jakarta/jmeter/trunk/src/core/org/apache/jmeter/testelement/AbstractScopedAssertion.java

jakarta/jmeter/trunk/src/core/org/apache/jmeter/testelement/AbstractScopedTestElement.java
jakarta/jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterThread.java
jakarta/jmeter/trunk/src/core/org/apache/jmeter/util/ScopePanel.java
jakarta/jmeter/trunk/xdocs/changes.xml
jakarta/jmeter/trunk/xdocs/images/screenshots/assertion/assertion.png
jakarta/jmeter/trunk/xdocs/images/screenshots/regex_extractor.png
jakarta/jmeter/trunk/xdocs/images/screenshots/size_assertion.png
jakarta/jmeter/trunk/xdocs/usermanual/component_reference.xml

Modified: jakarta/jmeter/trunk/docs/images/screenshots/assertion/assertion.png
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/docs/images/screenshots/assertion/assertion.png?rev=905832r1=905831r2=905832view=diff
==
Binary files - no diff available.

Added: 
jakarta/jmeter/trunk/docs/images/screenshots/assertion/assertionscopevar.png
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/docs/images/screenshots/assertion/assertionscopevar.png?rev=905832view=auto
==
Binary file - no diff available.

Propchange: 
jakarta/jmeter/trunk/docs/images/screenshots/assertion/assertionscopevar.png
--
svn:mime-type = image/png

Modified: jakarta/jmeter/trunk/docs/images/screenshots/regex_extractor.png
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/docs/images/screenshots/regex_extractor.png?rev=905832r1=905831r2=905832view=diff
==
Binary files - no diff available.

Modified: jakarta/jmeter/trunk/docs/images/screenshots/size_assertion.png
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/docs/images/screenshots/size_assertion.png?rev=905832r1=905831r2=905832view=diff
==
Binary files - no diff available.

Modified: 
jakarta/jmeter/trunk/src/components/org/apache/jmeter/assertions/ResponseAssertion.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/components/org/apache/jmeter/assertions/ResponseAssertion.java?rev=905832r1=905831r2=905832view=diff
==
--- 
jakarta/jmeter/trunk/src/components/org/apache/jmeter/assertions/ResponseAssertion.java
 (original)
+++ 
jakarta/jmeter/trunk/src/components/org/apache/jmeter/assertions/ResponseAssertion.java
 Tue Feb  2 23:09:53 2010
@@ -291,7 +291,9 @@
 }
 
 // What are we testing against?
-if (isTestFieldResponseData()) {
+if (isScopeVariable()){
+toCheck = getThreadContext().getVariables().get(getVariableName());
+} else if (isTestFieldResponseData()) {
 toCheck = response.getResponseDataAsString(); // (bug25052)
 } else if (isTestFieldResponseCode()) {
 toCheck = response.getResponseCode();
@@ -375,7 +377,9 @@
 StringBuilder sb = new StringBuilder(200);
 sb.append(Test failed: );
 
-if (isTestFieldResponseData()) {
+if (isScopeVariable()){
+sb.append(variable().append(getVariableName()).append(')');  
  
+} else if (isTestFieldResponseData()) {
 sb.append(text);
 } else if (isTestFieldResponseCode()) {
 sb.append

svn commit: r905446 - in /jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http: proxy/TestHttpRequestHdr.java sampler/PostWriterTest.java

2010-02-01 Thread sebb
Author: sebb
Date: Mon Feb  1 23:16:10 2010
New Revision: 905446

URL: http://svn.apache.org/viewvc?rev=905446view=rev
Log:
Stop using deprecated methods

Modified:

jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/proxy/TestHttpRequestHdr.java

jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/sampler/PostWriterTest.java

Modified: 
jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/proxy/TestHttpRequestHdr.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/proxy/TestHttpRequestHdr.java?rev=905446r1=905445r2=905446view=diff
==
--- 
jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/proxy/TestHttpRequestHdr.java
 (original)
+++ 
jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/proxy/TestHttpRequestHdr.java
 Mon Feb  1 23:16:10 2010
@@ -31,6 +31,7 @@
 import org.apache.jmeter.protocol.http.control.HeaderManager;
 import org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase;
 import org.apache.jmeter.protocol.http.util.HTTPArgument;
+import org.apache.jmeter.protocol.http.util.HTTPFileArg;
 
 public class TestHttpRequestHdr  extends JMeterTestCase {
 public TestHttpRequestHdr(String name) {
@@ -473,7 +474,6 @@
 assertEquals(value,header.getValue());
 }
 
-@SuppressWarnings(deprecation)
 public void testPostMultipartFileUpload() throws Exception {
 String url = http://localhost/matrix.html;;
 // A HTTP POST request, multipart/form-data, simple values,
@@ -496,9 +496,10 @@
 // Check arguments
 Arguments arguments = s.getArguments();
 assertEquals(0, arguments.getArgumentCount());
-assertEquals(fileFieldValue, s.getFileField());
-assertEquals(fileName, s.getFilename());
-assertEquals(mimeType, s.getMimetype());
+HTTPFileArg hfa = s.getHTTPFiles()[0]; // Assume there's at least one 
file
+assertEquals(fileFieldValue, hfa.getParamName());
+assertEquals(fileName, hfa.getPath());
+assertEquals(mimeType, hfa.getMimeType());
 }
 
 private String createMultipartFormBody(String titleValue, String 
descriptionValue, String contentEncoding, boolean includeExtraHeaders, String 
boundary, String endOfLine) {

Modified: 
jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/sampler/PostWriterTest.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/sampler/PostWriterTest.java?rev=905446r1=905445r2=905446view=diff
==
--- 
jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/sampler/PostWriterTest.java
 (original)
+++ 
jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/sampler/PostWriterTest.java
 Mon Feb  1 23:16:10 2010
@@ -36,6 +36,7 @@
 
 import org.apache.jmeter.config.Arguments;
 import org.apache.jmeter.protocol.http.util.HTTPArgument;
+import org.apache.jmeter.protocol.http.util.HTTPFileArg;
 import org.apache.jorphan.logging.LoggingManager;
 import org.apache.log.Logger;
 
@@ -588,16 +589,9 @@
  * 
  * @param httpSampler
  */
-@SuppressWarnings(deprecation)
 private void setupFilepart(HTTPSampler httpSampler, String fileField, File 
file, String mimeType) {
-httpSampler.setFileField(fileField);
-if(file != null) {
-httpSampler.setFilename(file.getAbsolutePath());
-}
-else {
-httpSampler.setFilename();
-}
-httpSampler.setMimetype(mimeType);
+HTTPFileArg[] hfa = {new HTTPFileArg(file == null ?  : 
file.getAbsolutePath(), fileField, mimeType)};
+httpSampler.setHTTPFiles(hfa);
 }
 
 /**



-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



svn commit: r905447 - /jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/sampler/TestHTTPSamplersAgainstHttpMirrorServer.java

2010-02-01 Thread sebb
Author: sebb
Date: Mon Feb  1 23:16:37 2010
New Revision: 905447

URL: http://svn.apache.org/viewvc?rev=905447view=rev
Log:
Stop using deprecated methods

Modified:

jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/sampler/TestHTTPSamplersAgainstHttpMirrorServer.java

Modified: 
jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/sampler/TestHTTPSamplersAgainstHttpMirrorServer.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/sampler/TestHTTPSamplersAgainstHttpMirrorServer.java?rev=905447r1=905446r2=905447view=diff
==
--- 
jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/sampler/TestHTTPSamplersAgainstHttpMirrorServer.java
 (original)
+++ 
jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/sampler/TestHTTPSamplersAgainstHttpMirrorServer.java
 Mon Feb  1 23:16:37 2010
@@ -34,6 +34,7 @@
 import org.apache.jmeter.protocol.http.control.TestHTTPMirrorThread;
 import org.apache.jmeter.protocol.http.util.EncoderCache;
 import org.apache.jmeter.protocol.http.util.HTTPArgument;
+import org.apache.jmeter.protocol.http.util.HTTPFileArg;
 import org.apache.jmeter.testelement.TestPlan;
 import org.apache.jmeter.threads.JMeterContextService;
 import org.apache.jmeter.threads.JMeterVariables;
@@ -1091,7 +1092,6 @@
  * 
  * @param httpSampler
  */
-@SuppressWarnings(deprecation)
 private void setupFileUploadData(
 HTTPSamplerBase httpSampler,
 boolean isEncoded,
@@ -1105,9 +1105,9 @@
 // Set the form data
 setupFormData(httpSampler, isEncoded, titleField, titleValue, 
descriptionField, descriptionValue);
 // Set the file upload data
-httpSampler.setFileField(fileField);
-httpSampler.setFilename(fileValue.getAbsolutePath());
-httpSampler.setMimetype(fileMimeType);  
+HTTPFileArg[] hfa = {new HTTPFileArg(fileValue == null ?  : 
fileValue.getAbsolutePath(), fileField, fileMimeType)};
+httpSampler.setHTTPFiles(hfa);
+
 }
 
 /**



-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



svn commit: r905456 - /jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/sampler/TestHTTPSamplers.java

2010-02-01 Thread sebb
Author: sebb
Date: Mon Feb  1 23:29:59 2010
New Revision: 905456

URL: http://svn.apache.org/viewvc?rev=905456view=rev
Log:
Stop using deprecated methods

Modified:

jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/sampler/TestHTTPSamplers.java

Modified: 
jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/sampler/TestHTTPSamplers.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/sampler/TestHTTPSamplers.java?rev=905456r1=905455r2=905456view=diff
==
--- 
jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/sampler/TestHTTPSamplers.java
 (original)
+++ 
jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/sampler/TestHTTPSamplers.java
 Mon Feb  1 23:29:59 2010
@@ -221,7 +221,6 @@
 assertEquals(http://www.apache.org/index.html;, 
config.getUrl().toString());
 }
 
-@SuppressWarnings(deprecation)
 public void testFileList(){
 HTTPSamplerBase config = new HTTPNullSampler();
 HTTPFileArg[] arg;
@@ -229,14 +228,12 @@
 assertNotNull(arg);
 assertEquals(0,arg.length);
 
-config.setFileField();
-config.setFilename();
-config.setMimetype();
+config.setHTTPFiles(new HTTPFileArg[]{new HTTPFileArg(,,)});
 arg = config.getHTTPFiles();
 assertNotNull(arg);
 assertEquals(0,arg.length);
 
-config.setMimetype(text/plain);
+config.setHTTPFiles(new HTTPFileArg[]{new 
HTTPFileArg(,,text/plain)});
 arg = config.getHTTPFiles();
 assertNotNull(arg);
 assertEquals(1,arg.length);
@@ -244,8 +241,7 @@
 assertEquals(,arg[0].getPath());
 assertEquals(,arg[0].getParamName());
 
-config.setFileField(test123.tmp);
-config.setFilename(/tmp/test123.tmp);
+config.setHTTPFiles(new HTTPFileArg[]{new 
HTTPFileArg(/tmp/test123.tmp,test123.tmp,text/plain)});
 arg = config.getHTTPFiles();
 assertNotNull(arg);
 assertEquals(1,arg.length);
@@ -293,44 +289,35 @@
 assertEquals(2,arg.length);
  }
 
-@SuppressWarnings(deprecation)
 public void testSetAndGetFileField() {
 HTTPSamplerBase sampler = new HTTPNullSampler();
-sampler.setFileField(param);
-assertEquals(param, sampler.getFileField());
+sampler.setHTTPFiles(new HTTPFileArg[]{new 
HTTPFileArg(,param,)});
 HTTPFileArg file = sampler.getHTTPFiles()[0];
 assertEquals(param, file.getParamName());
 
-sampler.setFileField(param2);
-assertEquals(param2, sampler.getFileField());
+sampler.setHTTPFiles(new HTTPFileArg[]{new 
HTTPFileArg(,param2,)});
 file = sampler.getHTTPFiles()[0];
 assertEquals(param2, file.getParamName());
-}
+}
 
-@SuppressWarnings(deprecation)
 public void testSetAndGetFilename() {
 HTTPSamplerBase sampler = new HTTPNullSampler();
-sampler.setFilename(name);
-assertEquals(name, sampler.getFilename());
+sampler.setHTTPFiles(new HTTPFileArg[]{new HTTPFileArg(name,,)});
 HTTPFileArg file = sampler.getHTTPFiles()[0];
 assertEquals(name, file.getPath());
 
-sampler.setFilename(name2);
-assertEquals(name2, sampler.getFilename());
+sampler.setHTTPFiles(new HTTPFileArg[]{new 
HTTPFileArg(name2,,)});
 file = sampler.getHTTPFiles()[0];
 assertEquals(name2, file.getPath());
 }
 
-@SuppressWarnings(deprecation)
 public void testSetAndGetMimetype() {
 HTTPSamplerBase sampler = new HTTPNullSampler();
-sampler.setMimetype(mime);
-assertEquals(mime, sampler.getMimetype());
+sampler.setHTTPFiles(new HTTPFileArg[]{new HTTPFileArg(,,mime)});
 HTTPFileArg file = sampler.getHTTPFiles()[0];
 assertEquals(mime, file.getMimeType());
 
-sampler.setMimetype(mime2);
-assertEquals(mime2, sampler.getMimetype());
+sampler.setHTTPFiles(new HTTPFileArg[]{new 
HTTPFileArg(,,mime2)});
 file = sampler.getHTTPFiles()[0];
 assertEquals(mime2, file.getMimeType());
 }



-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



svn commit: r905458 - /jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/AjpSampler.java

2010-02-01 Thread sebb
Author: sebb
Date: Mon Feb  1 23:30:24 2010
New Revision: 905458

URL: http://svn.apache.org/viewvc?rev=905458view=rev
Log:
Stop using deprecated methods

Modified:

jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/AjpSampler.java

Modified: 
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/AjpSampler.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/AjpSampler.java?rev=905458r1=905457r2=905458view=diff
==
--- 
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/AjpSampler.java
 (original)
+++ 
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/AjpSampler.java
 Mon Feb  1 23:30:24 2010
@@ -31,6 +31,7 @@
 import org.apache.jmeter.protocol.http.control.CookieManager;
 import org.apache.jmeter.protocol.http.control.Header;
 import org.apache.jmeter.protocol.http.control.HeaderManager;
+import org.apache.jmeter.protocol.http.util.HTTPFileArg;
 import org.apache.jmeter.testelement.property.CollectionProperty;
 import org.apache.jmeter.testelement.property.JMeterProperty;
 import org.apache.jmeter.testelement.property.PropertyIterator;
@@ -197,8 +198,8 @@
 AuthManager auth = getAuthManager();
 int hsz = 1; // Host always
 if(method.equals(POST)) {
-String fn = getFilename();
-if(fn != null  fn.trim().length()  0) {
+HTTPFileArg[] hfa = getHTTPFiles();
+if(hfa.length  0) {
 hsz += 3;
 } else {
 hsz += 2;
@@ -248,15 +249,17 @@
 }
 if(method.equals(POST)) {
 int cl = -1;
-String fn = getFilename();
-if(fn != null  fn.trim().length()  0) {
+HTTPFileArg[] hfa = getHTTPFiles();
+if(hfa.length  0) {
+HTTPFileArg fa = hfa[0];
+String fn = fa.getName();
 File input = new File(fn);
 cl = (int)input.length();
 body = new FileInputStream(input);
 setString(HEADER_CONTENT_DISPOSITION);
-setString(form-data; name=\+encode(getFileField())+
+setString(form-data; name=\+encode(fa.getParamName())+
   \; filename=\ + encode(fn) +\); //$NON-NLS-1$ 
//$NON-NLS-2$
-String mt = getMimetype();
+String mt = fa.getMimeType();
 
hbuf.append(HEADER_CONTENT_TYPE).append(COLON_SPACE).append(mt).append(NEWLINE);
 setInt(0xA007); // content-type
 setString(mt);



-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



svn commit: r905484 [2/2] - in /jakarta/jmeter/trunk: bin/ bin/testfiles/ src/protocol/http/org/apache/jmeter/protocol/http/sampler/ xdocs/

2010-02-01 Thread sebb
Modified: jakarta/jmeter/trunk/bin/testfiles/SimpleTestPlan.jmx
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/bin/testfiles/SimpleTestPlan.jmx?rev=905484r1=905483r2=905484view=diff
==
--- jakarta/jmeter/trunk/bin/testfiles/SimpleTestPlan.jmx (original)
+++ jakarta/jmeter/trunk/bin/testfiles/SimpleTestPlan.jmx Tue Feb  2 00:55:09 
2010
@@ -1,5 +1,5 @@
 ?xml version=1.0 encoding=UTF-8?
-jmeterTestPlan version=1.2 properties=1.8
+jmeterTestPlan version=1.2 properties=2.1
   hashTree
 TestPlan guiclass=TestPlanGui testclass=TestPlan testname=TestPlan 
enabled=true
   collectionProp name=TestPlan.thread_groups/
@@ -18,8 +18,8 @@
 stringProp name=ThreadGroup.num_threads1/stringProp
 boolProp name=ThreadGroup.schedulerfalse/boolProp
 elementProp name=ThreadGroup.main_controller 
elementType=LoopController guiclass=LoopControlPanel 
testclass=LoopController testname=LoopController enabled=true
-  stringProp name=LoopController.loops1/stringProp
   boolProp name=LoopController.continue_foreverfalse/boolProp
+  stringProp name=LoopController.loops1/stringProp
 /elementProp
 longProp name=ThreadGroup.end_time0/longProp
 stringProp name=ThreadGroup.on_sample_errorcontinue/stringProp
@@ -39,40 +39,34 @@
 GenericController guiclass=LogicControllerGui 
testclass=GenericController testname=Ant Pages enabled=true/
 hashTree
   HTTPSampler guiclass=HttpTestSampleGui testclass=HTTPSampler 
testname=Home Page enabled=true
+elementProp name=HTTPsampler.Arguments elementType=Arguments 
guiclass=HTTPArgumentsPanel testclass=Arguments enabled=true
+  collectionProp name=Arguments.arguments/
+/elementProp
 stringProp name=HTTPSampler.path/ant/index.html/stringProp
 stringProp name=HTTPSampler.methodGET/stringProp
 boolProp name=HTTPSampler.use_keepalivefalse/boolProp
 stringProp name=HTTPSampler.protocolhttp/stringProp
 boolProp name=HTTPSampler.image_parserfalse/boolProp
 boolProp name=HTTPSampler.follow_redirectsfalse/boolProp
-elementProp name=HTTPsampler.Arguments elementType=Arguments 
guiclass=HTTPArgumentsPanel testclass=Arguments enabled=true
-  collectionProp name=Arguments.arguments/
-/elementProp
 stringProp name=HTTPSampler.port/stringProp
-stringProp name=HTTPSampler.mimetype/stringProp
-stringProp name=HTTPSampler.FILE_FIELD/stringProp
 stringProp name=HTTPSampler.monitorfalse/stringProp
 stringProp name=HTTPSampler.domain/stringProp
-stringProp name=HTTPSampler.FILE_NAME/stringProp
 boolProp name=HTTPSampler.auto_redirectsfalse/boolProp
   /HTTPSampler
   hashTree/
   HTTPSampler guiclass=HttpTestSampleGui testclass=HTTPSampler 
testname=News Page enabled=true
+elementProp name=HTTPsampler.Arguments elementType=Arguments 
guiclass=HTTPArgumentsPanel testclass=Arguments enabled=true
+  collectionProp name=Arguments.arguments/
+/elementProp
 stringProp name=HTTPSampler.path/ant/antnews.html/stringProp
 stringProp name=HTTPSampler.methodGET/stringProp
 boolProp name=HTTPSampler.use_keepalivefalse/boolProp
 stringProp name=HTTPSampler.protocolhttp/stringProp
 boolProp name=HTTPSampler.image_parserfalse/boolProp
 boolProp name=HTTPSampler.follow_redirectsfalse/boolProp
-elementProp name=HTTPsampler.Arguments elementType=Arguments 
guiclass=HTTPArgumentsPanel testclass=Arguments enabled=true
-  collectionProp name=Arguments.arguments/
-/elementProp
 stringProp name=HTTPSampler.port/stringProp
-stringProp name=HTTPSampler.mimetype/stringProp
-stringProp name=HTTPSampler.FILE_FIELD/stringProp
 stringProp name=HTTPSampler.monitorfalse/stringProp
 stringProp name=HTTPSampler.domain/stringProp
-stringProp name=HTTPSampler.FILE_NAME/stringProp
 boolProp name=HTTPSampler.auto_redirectsfalse/boolProp
   /HTTPSampler
   hashTree/
@@ -80,46 +74,42 @@
 GenericController guiclass=LogicControllerGui 
testclass=GenericController testname=Log4J Pages enabled=true/
 hashTree
   HTTPSampler guiclass=HttpTestSampleGui testclass=HTTPSampler 
testname=Home Page enabled=true
+elementProp name=HTTPsampler.Arguments elementType=Arguments 
guiclass=HTTPArgumentsPanel testclass=Arguments enabled=true
+  collectionProp name=Arguments.arguments/
+/elementProp
 stringProp name=HTTPSampler.path/log4j/index.html/stringProp
 stringProp name=HTTPSampler.methodGET/stringProp
 boolProp 

svn commit: r904998 - /jakarta/jmeter/trunk/src/components/org/apache/jmeter/extractor/RegexExtractor.java

2010-01-31 Thread sebb
Author: sebb
Date: Sun Jan 31 11:02:40 2010
New Revision: 904998

URL: http://svn.apache.org/viewvc?rev=904998view=rev
Log:
Simplify initTemplate() by doing our own splitting
[using amended version of ORO split() code]

Modified:

jakarta/jmeter/trunk/src/components/org/apache/jmeter/extractor/RegexExtractor.java

Modified: 
jakarta/jmeter/trunk/src/components/org/apache/jmeter/extractor/RegexExtractor.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/components/org/apache/jmeter/extractor/RegexExtractor.java?rev=904998r1=904997r2=904998view=diff
==
--- 
jakarta/jmeter/trunk/src/components/org/apache/jmeter/extractor/RegexExtractor.java
 (original)
+++ 
jakarta/jmeter/trunk/src/components/org/apache/jmeter/extractor/RegexExtractor.java
 Sun Jan 31 11:02:40 2010
@@ -20,8 +20,6 @@
 
 import java.io.Serializable;
 import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.LinkedList;
 import java.util.List;
 
 import org.apache.commons.lang.StringEscapeUtils;
@@ -41,7 +39,6 @@
 import org.apache.oro.text.regex.PatternMatcherInput;
 import org.apache.oro.text.regex.Perl5Compiler;
 import org.apache.oro.text.regex.Perl5Matcher;
-import org.apache.oro.text.regex.Util;
 
 // @see org.apache.jmeter.extractor.TestRegexExtractor for unit tests
 
@@ -83,7 +80,7 @@
 
 private static final String UNDERSCORE = _;  // $NON-NLS-1$
 
-private Object[] template = null;
+private ListObject template;
 
 /**
  * Parses the response data using regular expressions and saving the 
results
@@ -287,14 +284,14 @@
 
 private String generateResult(MatchResult match) {
 StringBuilder result = new StringBuilder();
-for (int a = 0; a  template.length; a++) {
+for (Object obj : template) {
 if (log.isDebugEnabled()) {
-log.debug(RegexExtractor: Template piece # + a +  =  + 
template[a] +   +template[a].getClass().getSimpleName());
+log.debug(RegexExtractor: Template piece  + obj +  ( + 
obj.getClass().getSimpleName() + ));
 }
-if (template[a] instanceof String) {
-result.append(template[a]);
+if (obj instanceof Integer) {
+result.append(match.group(((Integer) obj).intValue()));
 } else {
-result.append(match.group(((Integer) template[a]).intValue()));
+result.append(obj);
 }
 }
 if (log.isDebugEnabled()) {
@@ -307,9 +304,8 @@
 if (template != null) {
 return;
 }
-ListString pieces = new ArrayListString();
 // Contains Strings and Integers
-ListObject combined = new LinkedListObject();
+ListObject combined = new ArrayListObject();
 String rawTemplate = getTemplate();
 PatternMatcher matcher = JMeterUtils.getMatcher();
 Pattern templatePattern = 
JMeterUtils.getPatternCache().getPattern(\\$(\\d+)\\$  // $NON-NLS-1$
@@ -319,55 +315,29 @@
 log.debug(Pattern =  + templatePattern.getPattern());
 log.debug(template =  + rawTemplate);
 }
-Util.split(pieces, matcher, templatePattern, rawTemplate);
-PatternMatcherInput input = new PatternMatcherInput(rawTemplate);
-boolean startsWith = isFirstElementGroup(rawTemplate);
-if (log.isDebugEnabled()) {
-log.debug(template split into  + pieces.size() +  pieces, 
starts with =  + startsWith);
-}
-if (startsWith) {
-String dropped = pieces.remove(0);// Remove initial empty entry
-if (log.isDebugEnabled()) {
-log.debug(Dropped leading: '+dropped+');
-}
-}
-IteratorString iter = pieces.iterator();
-while (iter.hasNext()) {
-final String next = iter.next();
-boolean matchExists = matcher.contains(input, templatePattern);
-if (startsWith) {
-if (matchExists) {
-combined.add(new Integer(matcher.getMatch().group(1)));
-}
-if (next.length()  0) {
-combined.add(next);
-}
-} else {
-if (next.length()  0) {
-combined.add(next);
-}
-if (matchExists) {
-combined.add(new Integer(matcher.getMatch().group(1)));
-}
+int beginOffset = 0;
+MatchResult currentResult;
+PatternMatcherInput pinput = new PatternMatcherInput(rawTemplate);
+while(matcher.contains(pinput, templatePattern)) {
+currentResult = matcher.getMatch();
+final int beginMatch = currentResult.beginOffset(0);
+if (beginMatch  beginOffset) { // string is not empty
+combined.add(rawTemplate.substring(beginOffset, beginMatch

svn commit: r904999 - /jakarta/jmeter/trunk/src/components/org/apache/jmeter/extractor/RegexExtractor.java

2010-01-31 Thread sebb
Author: sebb
Date: Sun Jan 31 11:08:28 2010
New Revision: 904999

URL: http://svn.apache.org/viewvc?rev=904999view=rev
Log:
template is created as needed, so no need to clone it

Modified:

jakarta/jmeter/trunk/src/components/org/apache/jmeter/extractor/RegexExtractor.java

Modified: 
jakarta/jmeter/trunk/src/components/org/apache/jmeter/extractor/RegexExtractor.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/components/org/apache/jmeter/extractor/RegexExtractor.java?rev=904999r1=904998r2=904999view=diff
==
--- 
jakarta/jmeter/trunk/src/components/org/apache/jmeter/extractor/RegexExtractor.java
 (original)
+++ 
jakarta/jmeter/trunk/src/components/org/apache/jmeter/extractor/RegexExtractor.java
 Sun Jan 31 11:08:28 2010
@@ -80,7 +80,7 @@
 
 private static final String UNDERSCORE = _;  // $NON-NLS-1$
 
-private ListObject template;
+private transient ListObject template;
 
 /**
  * Parses the response data using regular expressions and saving the 
results
@@ -275,13 +275,6 @@
 }
 }
 
-@Override
-public Object clone() {
-RegexExtractor cloned = (RegexExtractor) super.clone();
-cloned.template = this.template;
-return cloned;
-}
-
 private String generateResult(MatchResult match) {
 StringBuilder result = new StringBuilder();
 for (Object obj : template) {



-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



svn commit: r905000 - /jakarta/jmeter/trunk/src/components/org/apache/jmeter/extractor/RegexExtractor.java

2010-01-31 Thread sebb
Author: sebb
Date: Sun Jan 31 11:10:17 2010
New Revision: 905000

URL: http://svn.apache.org/viewvc?rev=905000view=rev
Log:
Needs serialVersionUID

Modified:

jakarta/jmeter/trunk/src/components/org/apache/jmeter/extractor/RegexExtractor.java

Modified: 
jakarta/jmeter/trunk/src/components/org/apache/jmeter/extractor/RegexExtractor.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/components/org/apache/jmeter/extractor/RegexExtractor.java?rev=905000r1=904999r2=905000view=diff
==
--- 
jakarta/jmeter/trunk/src/components/org/apache/jmeter/extractor/RegexExtractor.java
 (original)
+++ 
jakarta/jmeter/trunk/src/components/org/apache/jmeter/extractor/RegexExtractor.java
 Sun Jan 31 11:10:17 2010
@@ -44,6 +44,7 @@
 
 public class RegexExtractor extends AbstractScopedTestElement implements 
PostProcessor, Serializable {
 
+private static final long serialVersionUID = 240L;
 
 private static final Logger log = LoggingManager.getLoggerForClass();
 



-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



  1   2   3   4   5   6   7   8   9   10   >