HBASE-29601 Handle Junit 5 tests in TestCheckTestClasses#7311
Merged
stoty merged 1 commit intoapache:masterfrom Sep 18, 2025
Merged
HBASE-29601 Handle Junit 5 tests in TestCheckTestClasses#7311stoty merged 1 commit intoapache:masterfrom
stoty merged 1 commit intoapache:masterfrom
Conversation
|
🎊 +1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
Apache9
reviewed
Sep 18, 2025
|
|
||
| public static String[] getTagAnnotations(Class<?> c) { | ||
| // TODO handle optional Tags annotation | ||
| Tag[] tags = c.getAnnotationsByType(Tag.class); |
Contributor
Author
There was a problem hiding this comment.
This is the replacement for @category in Junit 5.
Contributor
Author
Contributor
There was a problem hiding this comment.
OK, also comment on another PR, we'd better introduce String constants for these tags.
Contributor
Author
There was a problem hiding this comment.
I tried, but String constants are not accepted, only literals.
Contributor
Author
There was a problem hiding this comment.
Correction: it works as long as it's a simple static string.
I tried to initialize it with Class.toString() that one did not work.
Contributor
Author
There was a problem hiding this comment.
Going to open a new ticket and PR
stoty
commented
Sep 18, 2025
| if (ClassTestFinder.getCategoryAnnotations(c).length == 0) { | ||
| if ( | ||
| ClassTestFinder.getCategoryAnnotations(c).length == 0 | ||
| && ClassTestFinder.getTagAnnotations(c).length == 0 |
Contributor
Author
There was a problem hiding this comment.
This is where we check for either.
Apache9
approved these changes
Sep 18, 2025
stoty
added a commit
that referenced
this pull request
Sep 18, 2025
Signed-off-by: Duo Zhang <zhangduo@apache.org> (cherry picked from commit 620f7a3)
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.
No description provided.