`RenderLock1Test`'s instability comes from Windows focus stealing mechanism 
getting in the way.

The test displays an alert and relies on whether the alert's Button receives 
focus while other window is rendering in the background. To successfully 
receive focus on the test Button the application itself must be granted focus 
first, which [in some cases can be rejected by the 
OS](https://bugs.openjdk.org/browse/JDK-8351357).

On macOS I noticed no issues - the test ran 100 times in a loop and succeeded 
every time, no matter if Gradle ran with or without daemon. Similarly I ran the 
test on our CI systems on repeat 100 times and it also succeeded there.

On Linux the test does not work because when the alert-displaying Stage is 
closed the "lost focus" event does not fire. This is a Linux specific issue and 
it [already is documented in-code with an 
assumption](https://github.com/openjdk/jfx/blob/master/tests/system/src/test/java/test/renderlock/RenderLockCommon.java#L111).

On Windows the focus problems come from aforementioned focus stealing 
prevention. The solution to this is similar to other tests that showed this 
problem, which is to run tests using `--no-daemon` flag in Gradle. I similarily 
tested this by running the test using `--no-daemon` flag on repeat 100 times 
and the test always passed.

I think we can mark this test as stable and include it into the testing pool. 

---------
- [x] I confirm that I make this contribution in accordance with the [OpenJDK 
Interim AI Policy](https://openjdk.org/legal/ai).

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

Commit messages:
 - Remove unstable flag from RenderLock1Test

Changes: https://git.openjdk.org/jfx/pull/2151/files
  Webrev: https://webrevs.openjdk.org/?repo=jfx&pr=2151&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8237018
  Stats: 3 lines in 1 file changed: 0 ins; 2 del; 1 mod
  Patch: https://git.openjdk.org/jfx/pull/2151.diff
  Fetch: git fetch https://git.openjdk.org/jfx.git pull/2151/head:pull/2151

PR: https://git.openjdk.org/jfx/pull/2151

Reply via email to