[foreign-memaccess+abi] RFR: Make TestHandshake more tolerant to spurious failures
Chris Hegarty
chegar at openjdk.java.net
Fri Apr 23 14:25:39 UTC 2021
On Fri, 23 Apr 2021 14:04:51 GMT, Maurizio Cimadamore <mcimadamore 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 58:
> 56: static final int SEGMENT_SIZE = 1_000_000;
> 57: static final int MAX_DELAY_MILLIS = 500;
> 58: static final int MAX_EXECUTOR_WAIT_SECONDS = 20;
The increased max executor wait time looks good. It will not unnecessarily cause the test to take longer to run, just tolerate slower runs.
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?
-------------
PR: https://git.openjdk.java.net/panama-foreign/pull/517
More information about the panama-dev
mailing list