On Fri, 16 Jun 2023 15:35:17 GMT, Andy Goryachev <ango...@openjdk.org> wrote:

>> tests/system/src/test/java/test/robot/javafx/scene/TextSurrogatePairInsertionIndexTest.java
>>  line 100:
>> 
>>> 98:     public static void initFX() {
>>> 99:         long seed = new Random().nextLong();
>>> 100:         System.out.println("seed=" + seed);
>> 
>> Do we need this print statement?
>
> yes.  I've added a brief comment, but let me explain in more detail:
> 
> these tests use random patterns to avoid hitting the same values each time.  
> for example, in TextFlowSurrogatePairInsertionIndexTest many tests 
> incremented the x coordinate by 5 prior to this change, but what if we had an 
> error condition happening with x = 21?.  the old test never hit that value, 
> but the new one might (at some point).  so we effectively extending the test 
> coverage every time the test runs.
> 
> and, if we ever encounter a failure, it will be possible to reproduce the 
> exact failure scenario by setting the same seed as found in the failed log.

Thanks for the details @andy-goryachev-oracle

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

PR Review Comment: https://git.openjdk.org/jfx/pull/1154#discussion_r1233526756

Reply via email to