RFR: 8301767: Convert virtual thread tests to JUnit [v2]
Alan Bateman
alanb at openjdk.org
Wed Feb 8 11:28:44 UTC 2023
On Wed, 8 Feb 2023 10:37:16 GMT, Jaikiran Pai <jpai at openjdk.org> wrote:
>> Alan Bateman has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains five commits:
>>
>> - Merge
>> - Merge
>> - Fix typos in comments
>> - GetStackTrace.java test missing @requires vm.continuations
>> - Initial commit
>
> test/jdk/jdk/internal/misc/ThreadFlock/WithScopedValue.java line 48:
>
>> 46:
>> 47: private static Stream<ThreadFactory> factories() {
>> 48: return Stream.of(Thread.ofPlatform().factory(), Thread.ofVirtual().factory());
>
> Previously, before this change, the data provided to the test methods, comprised of a virtual ThreadFactory and a `Executors.defaultThreadFactory()`. Is this switch to using a `Thread.ofPlatform().factory()` OK in the context of this test?
The tests run with both platform and virtual threads, it doesn't matter if the ThreadFactory for platform threads is Thread.ofPlatform().factory() or Executors.defaultThreadFactory(). It is changed to be former so it's consistent with the other tests.
-------------
PR: https://git.openjdk.org/jdk/pull/12426
More information about the serviceability-dev
mailing list