RFR: 8354695: Open source several swing tests batch7 [v7]

Alexander Zvegintsev azvegint at openjdk.org
Tue Apr 22 20:32:55 UTC 2025


On Tue, 22 Apr 2025 19:04:23 GMT, Damon Nguyen <dnguyen at openjdk.org> wrote:

>> Open-sourcing and standardizing several swing tests (JScrollPane & JRootPane)
>
> Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Add dispose and setVisible to runTest

test/jdk/javax/swing/JScrollPane/AcceleratedWheelScrolling/HorizScrollers.java line 54:

> 52: import javax.swing.SwingUtilities;
> 53: 
> 54: public class HorizScrollers {

The test instantly fails for me on the first phase after the EDT changes:

<details>
  <summary>jtr</summary>


----------System.out:(6/265)----------
PassFailJFrame: Phase 1 scroll speed 1
PassFailJFrame: Set the scrolling speed to the slowest value (1 line).
PassFailJFrame: Proceed to the test with go button
RTLS.runTest()
Testing Table
PassFailJFrame: Failure: java.lang.reflect.InvocationTargetException
----------System.err:(33/2218)----------
java.lang.Exception: Stack trace
	at java.base/java.lang.Thread.dumpStack(Thread.java:2148)
	at PassFailJFrame.forceFail(PassFailJFrame.java:1323)
	at PassFailJFrame.forceFail(PassFailJFrame.java:1314)
	at HorizScrollers$ConfigPanel.showFinalReminderIfNeeded(HorizScrollers.java:179)
	at HorizScrollers$ConfigPanel.lambda$actionPerformed$0(HorizScrollers.java:196)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:773)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:720)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:714)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
java.lang.RuntimeException: Failure Reason:
forceFail called
	at PassFailJFrame.awaitAndCheck(PassFailJFrame.java:1077)
	at HorizScrollers.main(HorizScrollers.java:76)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138)
	at java.base/java.lang.Thread.run(Thread.java:1575)

JavaTest Message: Test threw exception: java.lang.RuntimeException: Failure Reason:
forceFail called
JavaTest Message: shutting down test


</details>

![image](https://github.com/user-attachments/assets/cf6bf129-a47d-4c3c-904b-27ec6dd85844)

Please check it again with the deleted `JTwork` directory, as the test may have used the cached, previously compiled `RTLScrollers` class and didn't pick up your changes.

test/jdk/javax/swing/JScrollPane/AcceleratedWheelScrolling/HorizScrollers.java line 165:

> 163:                         ConfigPanel.this.getTopLevelAncestor(),
> 164:                         ("Test %s. please make sure you have restored " +
> 165:                                 "the original speed value blah blah")

Do we really need this exact wording?

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/24758#discussion_r2054821045
PR Review Comment: https://git.openjdk.org/jdk/pull/24758#discussion_r2054781397


More information about the client-libs-dev mailing list