Bug 61827

Summary: [JMSPublisher] Don't add new line at the end of the file
Product: JMeter Reporter: mchassagneux
Component: MainAssignee: JMeter issues mailing list <issues>
Status: RESOLVED FIXED    
Severity: major CC: p.mouawad
Priority: P2    
Version: Nightly (Please specify date)   
Target Milestone: ---   
Hardware: All   
OS: All   

Description mchassagneux 2017-11-28 12:18:59 UTC
Actually, a new line is adding to the content of the file read by a JMS publisher sampler.
The issue is on the getText method of the TextFile : 

=> sb.append(line + lineEnd);
Comment 1 Graham Russell 2017-12-01 02:08:56 UTC
Changing the behaviour of this to return the actual contents of the file breaks some tests - I've "fixed" them but please check to see if this is actually valid for the application as I don't have a good way to test JMS stuff. See: https://github.com/apache/jmeter/pull/346
Comment 2 Philippe Mouawad 2017-12-01 21:05:08 UTC
Author: pmouawad
Date: Fri Dec  1 21:04:37 2017
New Revision: 1816908

URL: http://svn.apache.org/viewvc?rev=1816908&view=rev
Log:
Bug 61827 - [JMSPublisher] Don't add new line at the end of the file
Contributed by Graham Russell
This closes #346
Bugzilla Id: 61827

Added:
    jmeter/trunk/test/src/org/apache/jorphan/io/
    jmeter/trunk/test/src/org/apache/jorphan/io/TextFileSpec.groovy
Modified:
    jmeter/trunk/src/jorphan/org/apache/jorphan/io/TextFile.java
    jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/PublisherSampler.java
    jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/render/TextMessageRenderer.java
    jmeter/trunk/test/src/org/apache/jmeter/protocol/jms/sampler/render/BinaryMessageRendererTest.java
    jmeter/trunk/test/src/org/apache/jmeter/protocol/jms/sampler/render/MessageRendererTest.java
    jmeter/trunk/test/src/org/apache/jmeter/protocol/jms/sampler/render/ObjectMessageRendererTest.java
    jmeter/trunk/test/src/org/apache/jmeter/protocol/jms/sampler/render/TextMessageRendererTest.java
    jmeter/trunk/xdocs/changes.xml