-
Notifications
You must be signed in to change notification settings - Fork 130
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
Deprecating RestartableJenkinsRule
#926
Conversation
* @since 1.567 | ||
* @deprecated New code should use {@link JenkinsSessionRule}. |
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.
hmm shouldn't new code use @WithJenkins
(JUnit 5)? with which you can use .restart()
directly on the jenkinsrule instance?
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 have no experience with the JUnit 5 facilities and see no reason to ever switch from 4.
Regarding JenkinsRule.restart
, I would not recommend it. It seems to make a copy of $JENKINS_HOME
, which JenkinsSessionRule
does not need to do. Also it does not support performing test steps in between Jenkins sessions, as JenkinsSessionRule
does.
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.
fyi @strangelookingnerd ^^
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 all for deprecating the rule. Overall I still think the transition towards JUnit5 is something we should promote rather than relying on a framework that is no longer maintained. I understand @jglick point that as of now there is little reason to switch, but that may change in the future.
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.
something we should promote
You should add Javadoc to various 4-specific utilities noting their replacements.
I found that some plugin developers were unaware that this class had long since been superseded by
JenkinsSessionRule
.