RFR: CODETOOLS-7903471: JMH: Add test for virtual threads executor
Sergey Kuksenko
skuksenko at openjdk.org
Wed May 17 15:02:52 UTC 2023
On Wed, 17 May 2023 14:40:34 GMT, Sergey Kuksenko <skuksenko at openjdk.org> wrote:
>> jmh-core-it/src/test/java/org/openjdk/jmh/it/threads/BenchExecutorTest.java line 74:
>>
>>> 72: @Setup(Level.Trial)
>>> 73: public void setupRun() {
>>> 74: setupRunThread.add(VirtualAPI.isVirtual(Thread.currentThread()));
>>
>> There seem to be little point in continuously adding the single `boolean` value here. I'd suggest we collect `Thread` instances instead, and check that there is a single expected thread, whether virtual or not.
>
> There are other tests that check a single expected thread.
Test checking is the benchmark was executed in the virtual thread or not.
-------------
PR Review Comment: https://git.openjdk.org/jmh/pull/103#discussion_r1196642333
More information about the jmh-dev
mailing list