Bug 50487 - runSerialTest verifies objects that never need persisting
Summary: runSerialTest verifies objects that never need persisting
Alias: None
Product: JMeter
Classification: Unclassified
Component: Main (show other bugs)
Version: Nightly (Please specify date)
Hardware: PC All
: P2 major (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
Depends on:
Reported: 2010-12-16 12:24 UTC by ansoni
Modified: 2010-12-16 13:02 UTC (History)
0 users

Patch of JMeterTest.java to address UI JUnit Problem (922 bytes, patch)
2010-12-16 12:25 UTC, ansoni
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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
Bug 50487 - runSerialTest verifies objects that never need persisting