On Fri, 1 Dec 2023 22:11:05 GMT, Viktor Klang <vkl...@openjdk.org> wrote:

>> Viktor Klang has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   Only run the cancellation tests for mapConcurrent for the shorter streams 
>> to conserve resources
>
> test/jdk/java/util/stream/BuiltInGatherersTest.java line 257:
> 
>> 255:         // Test cancellation after exception during processing
>> 256:         // Only use reasonably sized streams to avoid excessive thread 
>> creation
>> 257:         if (config.streamSize > 2 && config.streamSize < 100) {
> 
> @AlanBateman Decided to not run the cancellation tests for the larger streams 
> as it creates a bunch of extra resource usage which makes GHA really unhappy.

Okay but it makes me wonder if this test should have its use method source with 
the stream sizes that are sensible to test.

> @AlanBateman This is the only part of this I really don't like. Any better 
> suggestion as to "wait for N things waiting" in a test? 🤔

Semaphore::getQueueLength is more for monitoring purposes so the usual does 
seem a bit unusual here. There are a number of ways this could be done, maybe 
the simplest is for tasksWaiting to be an AtomicInteger and have the default 
just increment it and sleep-for-a-day.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/16928#discussion_r1413032883
PR Review Comment: https://git.openjdk.org/jdk/pull/16928#discussion_r1413037258

Reply via email to