RFR: 8284993: Replace System.exit call in swing tests with RuntimeException

Alexander Zvegintsev azvegint at openjdk.java.net
Tue Apr 19 18:53:23 UTC 2022


On Tue, 19 Apr 2022 09:10:30 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> wrote:

> Few swing tests call System.exit() which might stop the test harness from executing further tests if any of the test fail. We should replace with RuntimeException.

test/jdk/javax/swing/JComboBox/8019180/Test8019180.java line 66:

> 64:             }
> 65:             SwingUtilities.getWindowAncestor(this.test).dispose();
> 66:             LATCH.countDown();

Looks like that before the fix all tests had graceful shutdown in standalone mode.

Now there are hanging open windows when they fails.
e.g. those two lines could be wrapped in `finally` block for graceful test finish.

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

PR: https://git.openjdk.java.net/jdk/pull/8293



More information about the client-libs-dev mailing list