On Fri, 16 Jun 2023 08:34:29 GMT, Karthik P K <k...@openjdk.org> wrote:

>> Andy Goryachev has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   review comments
>
> 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.

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

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

Reply via email to