Integrated: 8340007: Refactor KeyEvent/FunctionKeyTest.java
Alexey Ivanov
aivanov at openjdk.org
Thu Sep 19 09:47:43 UTC 2024
On Mon, 16 Sep 2024 09:55:19 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:
> This changeset refactors `java/awt/event/KeyEvent/FunctionKeyTest.java`.
>
> Key changes:
>
> - Use `CyclicBarrier` to verify whether a key is pressed and released;
> - Use `CountDownLatch` for frame activation;
> - Ensure thread-safety for keeping thrown exceptions.
>
> Other changes:
>
> - Made `FunctionKeyTester` a nested class inside `FunctionKeyTest`;
> - Used constants for the key events rather than magic numbers.
>
> I ran the updated test a few times with `JTREG=REPEAT_COUNT=20`, the test has passed.
>
> The updated test executes somewhat quicker than the old one.
>
> @azvegint, you may want to take a look.
This pull request has now been integrated.
Changeset: 2faf8b8d
Author: Alexey Ivanov <aivanov at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/2faf8b8d582183275b1fdc92313a1c63c1753e80
Stats: 114 lines in 1 file changed: 62 ins; 15 del; 37 mod
8340007: Refactor KeyEvent/FunctionKeyTest.java
Reviewed-by: azvegint
-------------
PR: https://git.openjdk.org/jdk/pull/21013
More information about the client-libs-dev
mailing list