On Wed, 2 Sep 2026 08:54:09 GMT, Nir Lisker <[email protected]> wrote:

>> Andy Goryachev has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   review comments
>
> modules/javafx.graphics/src/test/java/test/javafx/scene/input/DataFormatTest.java
>  line 145:
> 
>> 143:     @Test
>> 144:     public void concurrencyWithSingleID() throws Exception {
>> 145:         long duration = 5_000;
> 
> 5 seconds for a single test is probably too long. Running all the tests in 
> the controls module takes about 2 minutes. I tested with 0.5 seconds and 
> there's no issue.
> 
> The way I do these race tests is with a `@RepeatedTest(M)` instead of the 
> sleep. Each tests runs N concurrent threads (N being "a lot") and the time it 
> takes them to finish is hardware-based, but running them M times 
> deterministically gives the non-flakiness guarantee. This way you don't need 
> to set a hardware-independent duration and the tests completes as fast as 
> possible. It's not like faster hardware requires more runs.

switched to `@RepeatedTest and 100k iterations per test (~0.2 sec per test), 
total test is about 2.3 seconds on mac M1

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

PR Review Comment: https://git.openjdk.org/jfx/pull/2197#discussion_r3916765191

Reply via email to