RFR: 8301736: jdk/incubator/concurrent/StructuredTaskScope/StructuredTaskScopeTest.java fail with -Xcomp
Alan Bateman
alanb at openjdk.org
Fri Feb 3 07:36:37 UTC 2023
On Fri, 3 Feb 2023 03:19:05 GMT, SUN Guoyun <duke at openjdk.org> wrote:
> Hi all,
> When `-Xcomp` be used, java thread to block for longer, then causing StructuredTaskScopeTest.java failed frequently on the AArch64 and LoongArch64 architecture.
>
> This PR fix the issue, Please help review it.
>
> Thanks.
test/jdk/jdk/incubator/concurrent/StructuredTaskScope/StructuredTaskScopeTest.java line 617:
> 615: try (var scope = new StructuredTaskScope(null, factory)) {
> 616: Future<String> future = scope.fork(() -> {
> 617: Thread.sleep(Duration.ofMillis(1000));
As a short term fix, this is okay, Duration.ofSeconds(2) might be a bit more robust. We are iterating on this API so there are test changes in the works, in this case we can change it to until that the sub-tasks is parked before calling joinUntil with the interrupt status set.
-------------
PR: https://git.openjdk.org/jdk/pull/12398
More information about the core-libs-dev
mailing list