[foreign-memaccess+abi] RFR: Make TestHandshake more tolerant to spurious failures

Maurizio Cimadamore mcimadamore at openjdk.java.net
Fri Apr 23 14:29:41 UTC 2021


On Fri, 23 Apr 2021 14:22:09 GMT, Chris Hegarty <chegar at openjdk.org> wrote:

>> Especially on Windows, we seem to have issues when it comes to spurious failures with these tests. This test require completion within 10 seconds, and sometimes on Windows it is possible to see (from logs) that no thread starts before 8.5 seconds (!!). This seems to be a transient issue, most likely caused by some environment factor in our test machines.
>> 
>> I have added some logic to print out which test starts first, and when.
>> 
>> I have also raised the threshold factor 2x.
>
> test/jdk/java/foreign/TestHandshake.java line 130:
> 
>> 128:         if (started.compareAndSet(false, true)) {
>> 129:             long delay = System.currentTimeMillis() - start.get();
>> 130:             System.out.println("Started first thread: " + name + " ; delay (ms): " + delay);
> 
> The additional diagnostic statements look good. Delay here is time "elapsed" since start right? (as opposed to the prior use of "delay" to mean "delay start of handshaker", right?

Good point - I'm using the wrong term - I'll rectify this.

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

PR: https://git.openjdk.java.net/panama-foreign/pull/517


More information about the panama-dev mailing list