Summary: | Jmeter should not exit without saving Test Plan if saving before exit fails | ||
---|---|---|---|
Product: | JMeter - Now in Github | Reporter: | shmulikk |
Component: | Main | Assignee: | JMeter issues mailing list <issues> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | p.mouawad |
Priority: | P2 | ||
Version: | 2.6 | ||
Target Milestone: | --- | ||
Hardware: | All | ||
OS: | All |
Description
shmulikk
2012-03-28 15:53:20 UTC
Date: Mon Apr 23 20:15:41 2012 New Revision: 1329421 URL: http://svn.apache.org/viewvc?rev=1329421&view=rev Log: Bug 52997 - Jmeter should not exit without saving Test Plan if saving before exit fails Modified: jmeter/trunk/src/core/org/apache/jmeter/gui/action/Save.java jmeter/trunk/xdocs/changes.xml Unfortunately, the fix does not work. File#canWrite() only returns true if the file already exists *and* can be written, so the upfront check means that test plans cannot be saved to new files. I think the best is to deal with any problems in the catch clause, rather than trying to anticipate them. Further testing shows that the problem is caused by the call to ActionRouter.getInstance().doActionNow(new ActionEvent(subTree, e.getID(), ActionNames.SUB_TREE_SAVED)); before the save is attempted. If this is moved after the SaveService.saveTree() call, the code behaves much better. Patch to be checked in shortly. Fixed in SVN: URL: http://svn.apache.org/viewvc?rev=1329669&view=rev Log: Bug 52997 - Jmeter should not exit without saving Test Plan if saving before exit fails Modified: jmeter/trunk/src/core/org/apache/jmeter/gui/action/Save.java Note: I removed the setDirty(true) method call and the clearing of the file name. Failure to save the file should not affect the dirty status. Clearing the filename does not really achieve anything. Leaving the issue open for now, in case there are further problems. URL: http://svn.apache.org/viewvc?rev=1330275&view=rev Log: Bug 52997 - Jmeter should not exit without saving Test Plan if saving before exit fails Fix crash with larger trees; only update saved copy of tree if we wrote the whole tree Modified: jmeter/trunk/src/core/org/apache/jmeter/gui/action/Save.java Hopefully issue now really fixed! Tests are OK for me. Closing issue as fixed. This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/2798 |