On Mon, 2 Dec 2024 17:12:53 GMT, Harshitha Onkar <[email protected]> wrote:

> The following two tests failed intermittently due to stability issues after 
> JEP486 (Removal of Security Manager). Tests have been updated for stability. 
> This test is applicable for linux platform only, hence `@requires (os.family 
> == "linux")`  jtreg tag is added and the redundant OS check within the test 
> is removed.
> 
> - java/awt/datatransfer/Independence/IndependenceAWTTest.java
> - java/awt/datatransfer/Independence/IndependenceSwingTest.java
> 
> Multiple runs of the test on CI looks good and the tests pass.

test/jdk/java/awt/datatransfer/Independence/IndependenceAWTTest.java line 167:

> 165:         robot.waitForIdle(500);
> 166: 
> 167:         if (primaryClip != null) {

Do we even need this check? I mean in the getPrimaryClipboard() you throw a 
runtime exception if primaryClip is null. The only possible option when there 
is no exception thrown and primaryClip is null is when inside 
getPrimaryClipboard() HeadlessException happened which should not be the case 
because of headful tag in the header. So what are we checking for here? In 
original test it was a soft way to skip test on Windows and macOS but you 
eliminated that check and added platform requirement to the header.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/22490#discussion_r1866380758

Reply via email to