RFR: 8292051: jdk/internal/misc/TerminatingThreadLocal/TestTerminatingThreadLocal.java failed "AssertionError: Expected terminated values: [666] but got: []"
Alan Bateman
alanb at openjdk.org
Tue Aug 16 10:00:16 UTC 2022
On Tue, 16 Aug 2022 09:06:31 GMT, Peter Levart <plevart at openjdk.org> 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...
> Hm, what about expanding the test cases programmatically. Like this?
> [plevart at ffc681f](https://github.com/plevart/jdk/commit/ffc681f3cccfdf473d4cc037e5f3e50f8172eec3)
> ...it's easier to follow. Some nits included...
I'm not sure that it's any easier to follow but I don't mind merging it in. The other cleanup is good.
-------------
PR: https://git.openjdk.org/jdk/pull/9819
More information about the core-libs-dev
mailing list