Bug 63069 - ResultCollector does not write end of XML file if user exits while a Recording or a test is running
Summary: ResultCollector does not write end of XML file if user exits while a Recordin...
Status: RESOLVED FIXED
Alias: None
Product: JMeter - Now in Github
Classification: Unclassified
Component: Main (show other bugs)
Version: 3.0
Hardware: All All
: P2 normal (vote)
Target Milestone: JMETER_5.1
Assignee: JMeter issues mailing list
URL:
Keywords: FixedInTrunk
Depends on:
Blocks:
 
Reported: 2019-01-08 20:07 UTC by UbikLoadPack support
Modified: 2019-01-08 20:15 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description UbikLoadPack support 2019-01-08 20:07:58 UTC
Reproducer while sampling:

- Create a test plan that contains a View Results Tree that write XML (click on Configure and check all except "Save Field Names (csv)" and fill in a filename
- Start the test 
- Exit JMeter without stopping test


Reproducer while recording:

- Use Recording Template
- Start Recorder
- Record some action
- Quit JMeter without stopping recorder

Expected result:
XML file is valid.

KO Result:
Check the XML file, it does not contains :
</testResults>



Fix is to use finalizeFileOutput in ShutdownHook instead of using flushFileOutput.
Comment 1 Philippe Mouawad 2019-01-08 20:15:04 UTC
Author: pmouawad
Date: Tue Jan  8 20:14:39 2019
New Revision: 1850790

URL: http://svn.apache.org/viewvc?rev=1850790&view=rev
Log:
Bug 63069 - ResultCollector does not write end of XML file if user exits while a Recording or a test is running

Contributed by UbikLoadPack
Bugzilla Id: 63069

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/reporters/ResultCollector.java
    jmeter/trunk/xdocs/changes.xml
Comment 2 The ASF infrastructure team 2022-09-24 20:38:15 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/4974