Test intermittently fails in linux citing cursor is not RESIZE cursor at tableheader cell boundary when the mouse is moved from one table header cell to another. Although I am not able to get the test to fail locally or in CI standalone but it seems the test can potentially fail as it moves the mouse across the header and checks the cursor whenever the mouse enters another column but the problem is that entering another column doesn’t always mean the cursor should be a resize cursor. The resize cursor appears only very close to the boundary. On Linux, some mouse movements may be combined or skipped, so the test can receive a position already past the boundary. The normal cursor is correct there, but the test reports a failure.
The test is made more robust: - Stops exactly at each column boundary and waits for mouse events to be processed. - Checks that the resize cursor is already set when the boundary’s rollover callback rolloverColumnUpdated() runs. - Checks that the normal cursor returns inside a column. - ui.prepare() ensures at which point mouse is expected, whether resize cursor is expected, clear the event flags and records failure - Logs the actual mouse coordinates to help explain any future failure. - Also magic number 9 is removed This makes the test more robust because it checks the cursor at known positions, instead of assuming where the mouse was when a column change was reported. It still detects the original cursor-update problem 100 iterations in linux and other platforms were run and seen to be ok.. --------- - [x] I confirm that I make this contribution in accordance with the [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). ------------- Commit messages: - 8392358: Test javax/swing/JTableHeader/6889007/bug6889007.java failed: Wrong type of cursor in OL9 Changes: https://git.openjdk.org/jdk/pull/33866/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=33866&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8392358 Stats: 164 lines in 1 file changed: 92 ins; 38 del; 34 mod Patch: https://git.openjdk.org/jdk/pull/33866.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/33866/head:pull/33866 PR: https://git.openjdk.org/jdk/pull/33866
