Repository navigation
Fix JFR event recorder unit tests #3066 - #3809
Merged
Merged
Conversation
Move the Java unit test into the Java test source tree so Surefire executes it again. Use a local event fixture without a corresponding JFR event type so the absent-type assertion no longer depends on CommandLatencyEvent coverage.
lsh1215
marked this pull request as ready for review
June 28, 2026 10:09
Contributor
Author
|
Thanks for the quick review and merge! |
Collaborator
|
My pleasure |
a-TODO-rov
pushed a commit
that referenced
this pull request
Jul 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #3066.
What changed
JfrEventRecorderUnitTestsfromsrc/test/kotlintosrc/test/javaso the Java unit test is compiled and executed by Surefire.CommandLatencyEventinshouldNotEmitEventForAbsentJfrEventTypewith a local event fixture that has no corresponding JFR event type.Why
The test was not discovered from its previous location. Once executed, the absent-JFR-type assertion also used a stale fixture because
CommandLatencyEventnow hasJfrCommandLatencyEventsupport.Verification
JAVA_HOME=/Users/leesanghun/Library/Java/JavaVirtualMachines/ms-21.0.10/Contents/Home mvn -Dtest=io.lettuce.core.event.jfr.JfrEventRecorderUnitTests testJAVA_HOME=/Users/leesanghun/Library/Java/JavaVirtualMachines/ms-21.0.10/Contents/Home mvn formatter:format -DskipTestsMake sure that:
mvn formatter:formattarget. Don’t submit any formatting related changes.Note
Low Risk
Test-only changes with no production code impact.
Overview
Updates
shouldNotEmitEventForAbsentJfrEventTypeso it records aEventWithoutJfrTypestub instead ofCommandLatencyEvent, which now maps to JFR viaJfrCommandLatencyEventand would make the “no JFR event emitted” assertion wrong.Cleans up unused imports and tags the test class with
UNIT_TESTonly.Reviewed by Cursor Bugbot for commit 7e6ee5c. Bugbot is set up for automated code reviews on this repo. Configure here.