Bug 58743

Summary: TableEditor could have its content not well saved (or loaded)
Product: JMeter - Now in Github Reporter: Vincent HERILIER <vherilier>
Component: MainAssignee: JMeter issues mailing list <issues>
Status: RESOLVED FIXED    
Severity: major CC: Alexander_Sergey, emi, p.mouawad
Priority: P2 Keywords: PatchAvailable
Version: 2.6   
Target Milestone: ---   
Hardware: All   
OS: All   
Bug Depends on: 58742    
Bug Blocks: 60124    
Attachments: log when the test is saved
log when the test is loaded
Test case showing the issue that truncates jmx files
Test case showing issue as a file is loaded
Testcase for AbstractProperty#normalizeList

Description Vincent HERILIER 2015-12-16 16:50:06 UTC
Hi,

Using 2 elements of the same kind with a TableEditor inside (AssertionCompare), one with its table filled, the other one with an empty table, if I save the test from the element with the empty content every works fine, but if I save from the other element 2 errors are raised (see save.log file attached)

NB: This issue is more visible if issue 58742 is fixed.

Adding a third element of the same kind after the two others with its table filled and saving the test well, if the test is reloaded, 4 errors are raised (see load.log filee attached) and the empty table of the second element is filled by the same content than the third one.
Comment 1 Vincent HERILIER 2015-12-16 16:51:29 UTC
Created attachment 33354 [details]
log when the test is saved
Comment 2 Vincent HERILIER 2015-12-16 16:51:52 UTC
Created attachment 33355 [details]
log when the test is loaded
Comment 3 Philippe Mouawad 2015-12-17 21:11:06 UTC
Hello,
Could you provide a Test plan and some screenshot ?
Thanks
Comment 4 Vincent HERILIER 2015-12-18 08:57:25 UTC
Created attachment 33361 [details]
Test case showing the issue that truncates jmx files

The test case is composed from a Thread Group with 2 Compare Assertion elements:
The first one has a row inserted in its TableEditor widget, the second has an empty one.
NB: switching from the to the other produce the bug 58742 so insure to delete intenpestive content added.
So if you are focused on the empty assertion element and that you perform a Save Action, everything goes.
Switch to the "filled" assertion element and Save the file, 2 errors are raised.
Comment 5 Vincent HERILIER 2015-12-18 08:59:35 UTC
Created attachment 33362 [details]
Test case showing issue as a file is loaded

The test case is composed from a Thread Group with 2 Compare Assertion elements:
The first one has an empty TableEditor widget, the second has a row inserted into its TableEditor widget.
Loading the file generates 2 errors.
Comment 6 Vincent HERILIER 2015-12-18 09:01:28 UTC
Hi Philippe,

I hope the 2 test cases will help you in your investigations.
Feel free to ask more information if required.

Thank you
Comment 7 Vincent HERILIER 2017-01-18 09:32:37 UTC
The issue, just have been experienced once again by the JMeter users I'm working with.
They lost their files because the issue truncates the XML content.
It is a critical data integrity issue.

After some investigations in JMeter code, I have difficulties to found where is really the root cause.
Maybe you have an idea of what could produce such issue.
And from your suggestion, I hope finding the issue and submit you a fix

thanks again for your support and suggestion
Comment 8 Philippe Mouawad 2017-01-22 18:40:07 UTC
Scenario related to Bug 60124:
- Create a Compare Assertion and fill in a row with 2 fields
- Create another Compare Assertion and keep it empty

Select last Compare Assertion and save => OK
Select first Compare Assertion and save => KO
Comment 9 Philippe Mouawad 2017-01-22 18:40:20 UTC
*** Bug 60124 has been marked as a duplicate of this bug. ***
Comment 10 Emilian Bold 2017-04-26 15:05:45 UTC
I've fixed this bug. See patch in this pull request: https://github.com/apache/jmeter/pull/293
Comment 11 Felix Schumacher 2017-04-26 20:48:08 UTC
Created attachment 34956 [details]
Testcase for AbstractProperty#normalizeList

The attached patch is for the proposed changes of pr #293.
Comment 12 Felix Schumacher 2017-04-28 19:32:55 UTC
Thanks Emilian for the fix.

This will be included in version 3.3.

Date: Fri Apr 28 19:30:23 2017
New Revision: 1793138

URL: http://svn.apache.org/viewvc?rev=1793138&view=rev
Log:
TableEditor can't be saved, when using two or more instances.

Bugfix provided by Emilian Bold (emi at apache.org)
This closes #293 on github.

Bugzilla Id: 58743

Added:
    jmeter/trunk/test/src/org/apache/jmeter/testelement/property/AbstractPropertyTest.java   (with props)
Modified:
    jmeter/trunk/src/core/org/apache/jmeter/testelement/property/AbstractProperty.java
    jmeter/trunk/xdocs/changes.xml
Comment 13 The ASF infrastructure team 2022-09-24 20:38:01 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/3735