-
Notifications
You must be signed in to change notification settings - Fork 885
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
[sinttest] Allow custom processing of test run result #588
[sinttest] Allow custom processing of test run result #588
Conversation
ae11892
to
a34e1af
Compare
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.
Thanks for your contribution. Had time to give it some thought. Only minor things to fix.
smack-integration-test/src/main/java/org/igniterealtime/smack/inttest/Configuration.java
Show resolved
Hide resolved
smack-integration-test/src/main/java/org/igniterealtime/smack/inttest/Configuration.java
Outdated
Show resolved
Hide resolved
...ation-test/src/main/java/org/igniterealtime/smack/inttest/SmackIntegrationTestFramework.java
Outdated
Show resolved
Hide resolved
...ation-test/src/main/java/org/igniterealtime/smack/inttest/SmackIntegrationTestFramework.java
Show resolved
Hide resolved
Applied all review feedback. |
Squash please. |
This adds a new configuration option, `testRunResultProcessors`, that allows a user to customize the way the results of a test run is processed. By default, the pre-exising printing-to-stderr is used.
d35904f
to
5622bb0
Compare
Squashed. |
@@ -473,6 +480,15 @@ public Builder setCompatibilityMode(String compatibilityModeString) { | |||
return setCompatibilityMode(compatibilityMode); | |||
} | |||
|
|||
public Builder setTestRunResultProcessors(String testRunResultProcessorsString) { | |||
if (testRunResultProcessorsString == null) { |
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.
Calling a public API like this with null
should usually throw an exception. It is not defined that calling this method with null
actually does and therefore it is most likely a sign of a programming error, e.g., the user wanting to set a result processor for somehow it ended up being null
.
The same argument can be made for the empty string.
Therefore, use StringUtils.requireNonNullNorEmpty(testRunResultProcessorString)
here.
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'm happy to change this, but it's a pattern that's used throughout this implementation. Do you want me to change it everywhere?
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.
Uh, fair point. Thanks for pointing this out. There is probably more to it that I don't remember.
In any case, if this is going to get changed, it will be done outside of this PR for all methods.
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.
One minor thing, then its good to go.
This adds a new configuration option,
testRunResultProcessors
, that allows a user to customize the way the results of a test run is processed.By default, the pre-exising printing-to-stderr is used.