Summary: | TestBeanGUI - wrong language settings found | ||
---|---|---|---|
Product: | JMeter - Now in Github | Reporter: | Sebb <sebb> |
Component: | Main | Assignee: | JMeter issues mailing list <issues> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | p.mouawad |
Priority: | P2 | ||
Version: | 2.9 | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Attachments: | Test case |
Description
Sebb
2013-07-06 13:55:49 UTC
This issue started in 2.9. In 2.8 it is all good. Broken in 2.8 for me. I first tried adding BSF and JSR223 samplers to Workbench - looked OK. I then moved them under Thread Group and saved as JMX (to follow). On reload, both the drop-downs showed the same list. I think the problem is that the same PropertyDescriptor instances are created for what should be different beans. I don't know why that is yet, probably because the beans share inherited information. Maybe the Introspector parameters are wrong. Created attachment 30561 [details]
Test case
I think regression came from 54110. sebb regarding your test case, I just put them as children of Workbench and I see they have the same language while they should not Date: Sun Jul 7 20:04:34 2013 New Revision: 1500526 URL: http://svn.apache.org/r1500526 Log: Bug 55203 - TestBeanGUI - wrong language settings found Bugzilla Id: 55203 Modified: jmeter/trunk/src/protocol/java/org/apache/jmeter/protocol/java/sampler/JSR223SamplerBeanInfo.java Debugging I see the 2 classes share the same PropertyDescriptor instance. Yes, they share the same rootBeanInfo class, i.e. java.beans.GenericBeanInfo, which I think is the problem here. Although they are obviously different instances, the class is what seems to be used for distinguishing cached elements. (In reply to Philippe Mouawad from comment #5) > Date: Sun Jul 7 20:04:34 2013 > New Revision: 1500526 > > URL: http://svn.apache.org/r1500526 > Log: > Bug 55203 - TestBeanGUI - wrong language settings found > Bugzilla Id: 55203 > > Modified: > > jmeter/trunk/src/protocol/java/org/apache/jmeter/protocol/java/sampler/ > JSR223SamplerBeanInfo.java Good catch, but unfortunately not the solution. I tried removing the shared setup from the ScriptingBeanInfoSupport class and copied it down to the BSF and JSR223 classes, and that does not make any difference either (In reply to Philippe Mouawad from comment #4) > I think regression came from 54110. Bug 54110 moved the common fields and setters/getters to a shared super-class. I just tried moving them back, and it does not fix the issue. (In reply to Sebb from comment #10) > (In reply to Philippe Mouawad from comment #4) > > I think regression came from 54110. > > Bug 54110 moved the common fields and setters/getters to a shared > super-class. > > I just tried moving them back, and it does not fix the issue. Oops, sorry - I thought the lists looked the same, but I'd forgotten I'd converted JSR223 to all lower case and I was looking for an uppercase entry. Should have checked more carefully. The problem does seem to be the shared class with different requirements for the TAG field. However, it does not seem to be a problem for the other shared fields where the attributes may vary - e.g. scripting.displayName which shows the different script variables that are available. Hopefully this fixes the issue: URL: http://svn.apache.org/r1500556 Log: TestBeanGUI - wrong language settings found Bugzilla Id: 55203 Modified: jmeter/trunk/src/core/org/apache/jmeter/util/BSFTestElement.java jmeter/trunk/src/core/org/apache/jmeter/util/JSR223TestElement.java jmeter/trunk/src/core/org/apache/jmeter/util/ScriptingTestElement.java jmeter/trunk/xdocs/changes.xml Leaving open for now in case there are other shared parameters that need moving (In reply to Sebb from comment #7) > Yes, they share the same rootBeanInfo class, i.e. > java.beans.GenericBeanInfo, which I think is the problem here. Although they > are obviously different instances, the class is what seems to be used for > distinguishing cached elements. They really share the same instance. Issue also affects short description for example. Issue no more apparent with moving scriptLanguage to 2 subclasses I think it must have been a combination of the two issues. JMeter 2.7 has the problem, and was before the properties were moved to the shared super-class. However the JSR223SamplerBeanInfo class extended the wrong base class. == There are still properties that are shared between GUI classes - e.g. all the JSR223 classes share the same definition of the "script" property. The TAGS field is an attribute of the "script" PropertyDescriptor which varies between sub-classes whereas the other attributes are identical to all sub-classes. I think that is probably why they work OK; the PropertyDescriptor is used to look-up the names and types of the properties which don't vary. It was only the TAGS attribute that varied. This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/3158 |