RFR: 8302511: HitInfo.toString() throws IllegalArgumentException [v2]

Karthik P K kpk at openjdk.org
Mon Jun 19 05:01:15 UTC 2023


On Fri, 16 Jun 2023 15:35:17 GMT, Andy Goryachev <angorya at 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


More information about the openjfx-dev mailing list