-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Report warning when @SuiteDisplayName
is blank
#4822
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
base: main
Are you sure you want to change the base?
Report warning when @SuiteDisplayName
is blank
#4822
Conversation
Report WARNING when @SuiteDisplayName contains blank or whitespace-only values.
@SuiteDisplayName
is blank
Indeed, we do not want to use Even though I did not explicitly state it in #4810, the intention was to make use of the discovery issue mechanism to report a warning like with Though, for 6.0 I personally think it should be an error instead of a warning. @marcphilipp, thoughts? |
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.
I took a quick glance and think this PR looks pretty good; however, I will probably let @marcphilipp review it as well.
In addition, I requested two very minor changes to Javadoc.
/** | ||
* Test suite with blank @SuiteDisplayName to verify validation. | ||
* | ||
* @since 6.0.0-RC1 |
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.
* @since 6.0.0-RC1 | |
* @since 6.0 |
We do not use values such as 6.0.0-RC1
for @since
tags.
/** | ||
* Test suite with whitespace-only @SuiteDisplayName to verify validation. | ||
* | ||
* @since 6.0.0-RC1 |
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.
* @since 6.0.0-RC1 | |
* @since 6.0 |
@sbrannen |
Purpose
This PR adds a discovery-time validation for
@SuiteDisplayName
in the Suite Engine.If the annotation value is blank or whitespace-only, the engine now reports a
DiscoveryIssue
with WARNING severity.Related issue
@SuiteDisplayName
#4810Key Changes
SuiteTestDescriptor
: invokeinspectSuiteDisplayName(...)
during construction and report a warning when needed.(referred to DisplayNameUtils.validateAnnotation().)
Preconditions.notBlank()
to throw aPreconditionViolationException
when the value contains only whitespace.However, to maintain backward compatibility, I decided that reporting a warning would be more appropriate than throwing an exception.
Definition of Done
@API
annotations