On Wed, 10 Aug 2022 09:18:01 GMT, Alan Bateman <[email protected]> wrote:
> Change the test to use a custom scheduler so there is better control on when
> the carrier threads terminates. Also convert test to TestNG so that all test
> cases can be run in the context of a virtual thread.
test/jdk/jdk/internal/misc/TerminatingThreadLocal/TestTerminatingThreadLocal.java
line 84:
> 82: testCase(42, ttl -> { ttl.set(NULL); ttl.remove(); ttl.get();
> }, 42 ),
> 83: testCase(42, ttl -> { ttl.get(); ttl.remove();
> ttl.set(NULL); }, NULL),
> 84: };
Hm, what about expanding the test cases programmatically. Like this?
https://github.com/plevart/jdk/commit/ffc681f3cccfdf473d4cc037e5f3e50f8172eec3
...it's easier to follow. Some nits included...
-------------
PR: https://git.openjdk.org/jdk/pull/9819