RFR: 8292051: jdk/internal/misc/TerminatingThreadLocal/TestTerminatingThreadLocal.java failed "AssertionError: Expected terminated values: [666] but got: []"
Peter Levart
plevart at openjdk.org
Tue Aug 16 09:10:28 UTC 2022
On Wed, 10 Aug 2022 09:18:01 GMT, Alan Bateman <alanb 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...
-------------
PR: https://git.openjdk.org/jdk/pull/9819
More information about the core-libs-dev
mailing list