On Thu, 24 Apr 2025 12:51:09 GMT, Khalid Boulanouare <d...@openjdk.org> wrote:
>> Fixes issue in which the test fails when run on multi-screen machine. >> >> Tested on Ubuntu 24.04, MacOS 15 and Windows 11 >> >> JTREG >> >> runner starting test: java/awt/Frame/MultiScreenTest.java >> runner finished test: java/awt/Frame/MultiScreenTest.java >> Passed. Execution successful > > Khalid Boulanouare has updated the pull request incrementally with two > additional commits since the last revision: > > - 8352149: open/test/jdk/java/awt/Frame/MultiScreenTest.java fails in MacOS > - Revert "8352149: open/test/jdk/java/awt/Frame/MultiScreenTest.java fails > in MacOS" > > This reverts commit e938333b874342a6d0b3aa7d69263b97e5b3e17e. The test doesn't work on Linux either. The problem on Linux is that there are too many graphics configurations are returned. On my Fedora Linux 42 with two monitors, `gs[j].getConfigurations()` returns an array of length **176**. It could be the reason why the loop divides the number of configurations: `gc.length / 2`. In the end, this loop creates **176** window and a thread for each of the windows. This hangs GNOME shell completely. A few times, I was able to kill the `java` process via SSH connection, but it doesn't always help, and it still takes quite a while to get back to responsive UI. I'm sure this problem was discussed somewhere… (I'll search for that discussion later.) We should limit testing to default configurations only. As for Windows, the test could be usable on Windows and macOS if you remove replace `< gc.length / 2` with `< gc.length` as @kboulanou suggested initially. On Windows and macOS, there's usually only one configuration returned from `gs[j].getConfigurations()` for each screen. ------------- PR Comment: https://git.openjdk.org/jdk/pull/24752#issuecomment-2832601336