On Fri, 1 Sep 2023 14:37:53 GMT, Kevin Rushforth <k...@openjdk.org> wrote:

>> tests/system/src/test/java/test/javafx/embed/swing/SwingNodeContentMemoryLeakTest.java
>>  line 94:
>> 
>>> 92:                 //Lets throw in a little sleep so we can read the output
>>> 93:                 try {
>>> 94:                     Thread.sleep(100);
>> 
>> I would suggest to use random delay here (random.nextInt(100)).
>> But make sure to set a random seed at the beginning and print it so it can 
>> be reproduced.  Although in this test, the outcome depends on many things 
>> that the test has no control over.
>> What do you think?
>
> No, let's not. While there may be some rare cases where randomness adds 
> something useful to the test, automated tests should be predictable.

they become predictable when the seed is known.

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

PR Review Comment: https://git.openjdk.org/jfx/pull/1228#discussion_r1313132281

Reply via email to