Bug 61827 - [JMSPublisher] Don't add new line at the end of the file
Summary: [JMSPublisher] Don't add new line at the end of the file
Status: RESOLVED FIXED
Alias: None
Product: JMeter
Classification: Unclassified
Component: Main (show other bugs)
Version: Nightly (Please specify date)
Hardware: All All
: P2 major (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-28 12:18 UTC by mchassagneux
Modified: 2017-12-01 21:05 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
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