Am 04.03.2017 um 15:11 schrieb Philippe Mouawad:
Hi Felix,
Do we have a test case for the problem ?
No.

I looked at ResultConverter, but that class seems to be hard to test.

And if PrintWriter is supposed to be thread-safe, we should not have a problem. (Even if it has been reported on the mailing list and it happened to me.)

Thanks


On Sat, Mar 4, 2017 at 3:10 PM, Felix Schumacher <
felix.schumac...@internetallee.de> wrote:

Am 04.03.2017 um 13:46 schrieb sebb:

-1

If there is a problem, don't think this is the solution - see the Bug
report

There is a problem, but I will revert it, based on your description.


On 4 March 2017 at 10:55,  <fschumac...@apache.org> wrote:

Author: fschumacher
Date: Sat Mar  4 10:55:15 2017
New Revision: 1785464

URL: http://svn.apache.org/viewvc?rev=1785464&view=rev
Log:
Synchronize file access while writing CSV data.

Bugzilla Id: 60818

Modified:
      jmeter/trunk/src/core/org/apache/jmeter/reporters/ResultCol
lector.java
      jmeter/trunk/xdocs/changes.xml

Modified: jmeter/trunk/src/core/org/apache/jmeter/reporters/ResultColl
ector.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apach
e/jmeter/reporters/ResultCollector.java?rev=1785464&r1=
1785463&r2=1785464&view=diff
============================================================
==================
--- jmeter/trunk/src/core/org/apache/jmeter/reporters/ResultCollector.java
(original)
+++ jmeter/trunk/src/core/org/apache/jmeter/reporters/ResultCollector.java
Sat Mar  4 10:55:15 2017
@@ -544,7 +544,9 @@ public class ResultCollector extends Abs
                           SaveService.saveSampleResult(event, out);
                       } else { // !saveAsXml
                           String savee = CSVSaveService.resultToDelimit
edString(event);
-                        out.println(savee);
+                        synchronized (LOCK) {
+                            out.println(savee);
+                        }
                       }
                   } catch (Exception err) {
                       log.error("Error trying to record a sample", err);
// should throw exception back to caller

Modified: jmeter/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.xml?
rev=1785464&r1=1785463&r2=1785464&view=diff
============================================================
==================
--- jmeter/trunk/xdocs/changes.xml [utf-8] (original)
+++ jmeter/trunk/xdocs/changes.xml [utf-8] Sat Mar  4 10:55:15 2017
@@ -338,6 +338,7 @@ This affects configuration and 3rd party
       <li><bug>60621</bug>The "<code>report-template</code>" folder is
missing from <code>ApacheJMeter_config-3.1.jar</code> in maven
central</li>
       <li><bug>60744</bug>GUI elements are not cleaned up when reused
during load of Test Plan which can lead them to be partially initialized
with a previous state for a new Test Element</li>
       <li><bug>60812</bug>JMeterThread does not honor contract of
JMeterStopTestNowException</li>
+    <li><bug>60818</bug>Synchronize file access while writing CSV
data.</li>
   </ul>

    <!--  =================== Thanks =================== -->





Reply via email to