On Fri, 3 Feb 2023 07:41:24 GMT, SUN Guoyun <[email protected]> wrote:
>> 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?
Go ahead with the change as this testInterruptJoinUntil isn't robust (as you've
found with the -Xcomp runs). When we refresh the test we'll replace this part
so that it poll the subtask until it is parked before testing joinUntil with
the interrupt status set.
-------------
PR: https://git.openjdk.org/jdk/pull/12398