Bug 50487

Summary: runSerialTest verifies objects that never need persisting
Product: JMeter - Now in Github Reporter: ansoni
Component: MainAssignee: JMeter issues mailing list <issues>
Status: RESOLVED FIXED    
Severity: major    
Priority: P2    
Version: Nightly (Please specify date)   
Target Milestone: ---   
Hardware: PC   
OS: All   
Attachments: Patch of JMeterTest.java to address UI JUnit Problem

Description ansoni 2010-12-16 12:24:02 UTC
I've seen an old user-list topic around this error:

     [java] 6) runSerialTest(org.apache.jmeter.junit.JMeterTest)junit.framework.AssertionFailedError: serialization of org.apache.jmeter.gui.SavePropertyDialog failed: java.io.NotSerializableException: com.apple.laf.AquaComboBoxUI
     [java] 	at org.apache.jmeter.junit.JMeterTest.runSerialTest(JMeterTest.java:506)
     [java] 	at sun.reflect.GeneratedMethodAccessor40.invoke(Unknown Source)
     [java] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     [java] 	at org.apache.jorphan.test.AllTests.main(AllTests.java:225)

Basically, we are verifying that objects serialize because JMeter needs to serialize all those TestElements.  For some reason this test was testing SavePropertyDialog which we never need to persist.

The error above appears to be constrained to building on MacOSX presumably because Apple decided their JVM didn't make the AquaComboBoxUI class serializable.

Anyways, the fix is easy and will be attached.
Comment 1 ansoni 2010-12-16 12:25:27 UTC
Created attachment 26415 [details]
Patch of JMeterTest.java to address UI JUnit Problem
Comment 2 Sebb 2010-12-16 12:52:42 UTC
Good catch.

Since none of the GUI elements need to be serialised for client-server mode, it might be simpler just to check for java.awt.Component, which is parent of both JComponent and JDialog.
Comment 3 Sebb 2010-12-16 13:02:24 UTC
Fixed by skipping instances of Component.

URL: http://svn.apache.org/viewvc?rev=1050080&view=rev
Log:
Bug 50487 - runSerialTest verifies objects that never need persisting

Modified:
   jakarta/jmeter/trunk/test/src/org/apache/jmeter/junit/JMeterTest.java
   jakarta/jmeter/trunk/xdocs/changes.xml
Comment 4 The ASF infrastructure team 2022-09-24 20:37:45 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/2443