jmeter-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: svn commit: r1197316 - /jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/SubscriberSampler.java
Date Thu, 03 Nov 2011 22:28:33 GMT
On 3 November 2011 21:26,  <pmouawad@apache.org> wrote:
> Author: pmouawad
> Date: Thu Nov  3 21:26:16 2011
> New Revision: 1197316
>
> URL: http://svn.apache.org/viewvc?rev=1197316&view=rev
> Log:
> Bug 52052 - Using a delimiter to separate result-messages for JMS Subscriber
> Fix setting \t, \n , \r as separator

This needs to be documented in component_reference.

> Modified:
>    jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/SubscriberSampler.java
>
> Modified: jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/SubscriberSampler.java
> URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/SubscriberSampler.java?rev=1197316&r1=1197315&r2=1197316&view=diff
> ==============================================================================
> --- jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/SubscriberSampler.java
(original)
> +++ jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/SubscriberSampler.java
Thu Nov  3 21:26:16 2011
> @@ -93,6 +93,8 @@ public class SubscriberSampler extends B
>
>     private transient boolean START_ON_SAMPLE = false;
>
> +       private volatile String separator;

Not sure it needs to be volatile as samplers aren't shared across
threads, but it should probably be transient.

> +
>     public SubscriberSampler() {
>         super();
>     }
> @@ -248,7 +250,7 @@ public class SubscriberSampler extends B
>                     }
>                 }
>                 Utils.messageProperties(propBuffer, msg);
> -                propBuffer.append(getSeparator());
> +                propBuffer.append(separator);
>             } catch (JMSException e) {
>                 log.error(e.getMessage());
>             }
> @@ -455,7 +457,10 @@ public class SubscriberSampler extends B
>      * {@inheritDoc}
>      */
>     public void testStarted() {
> -        //NOOP
> +       separator = getSeparator();
> +       separator = separator.replace("\\t", "\t");
> +       separator = separator.replace("\\n", "\n");
> +       separator = separator.replace("\\r", "\r");
>     }
>
>     /**
>
>
>

Mime
View raw message