-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ThreadFactory tags to differentiate platform and virtual threads #1794
Conversation
Note that the total thread count metrics reported by ThreadMXBean only report on platform threads, so they needn't be updated.
Generate changelog in
|
} | ||
|
||
@Test | ||
void testVirtualThreadInstrumentation() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These tests share a fair bit of code. I bias away from sharing functionality between tests because it often results in refactors down the line that reduce the efficacy of some tests. In this case the tests are validating very similar things with different inputs, so there may be a stronger argument for sharing test code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good to me. One question on skipping virtual thread test on JDK < 21
ThreadFactory delegate = VirtualThreads.get() | ||
.orElseThrow(() -> new AssertionError("Expected jdk21+")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we assumeThat(VirtualThreads.get).isPresent()
or similar to allow skipping test on JDK < 21?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Released 0.77.0 |
Note that the total thread count metrics reported by ThreadMXBean only report on platform threads, so they needn't be updated.
==COMMIT_MSG==
Add ThreadFactory tags to differentiate platform and virtual threads
==COMMIT_MSG==