RFR: 8301736: jdk/incubator/concurrent/StructuredTaskScope/StructuredTaskScopeTest.java fail with -Xcomp
SUN Guoyun
duke at openjdk.org
Fri Feb 3 07:43:51 UTC 2023
On Fri, 3 Feb 2023 07:31:21 GMT, Alan Bateman <alanb 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 poll until the sub-task is parked before calling joinUntil with the interrupt status set.
So do I change to `Duration.ofSeconds(2)` or cancel this PR?
-------------
PR: https://git.openjdk.org/jdk/pull/12398
More information about the core-libs-dev
mailing list