-
-
Notifications
You must be signed in to change notification settings - Fork 9k
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
[JENKINS-32777] Cover 'delete-builds' CLI by tests #2310
Conversation
|
||
@Test public void deleteBuildsShouldSuccessEvenTheBuildIsRunning() throws Exception { | ||
FreeStyleProject project = j.createFreeStyleProject("aProject"); | ||
project.getBuildersList().add(new Shell("echo 1\nsleep 10s")); |
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.
This is fragile. Something like ExecutorTest.BlockingBuilder
should be used.
LGTM |
|
||
@Test public void deleteBuildsManyShouldSuccessEvenTheFirstAndLastBuildDoesNotExist() throws Exception { | ||
FreeStyleProject project = j.createFreeStyleProject("aProject"); | ||
project.scheduleBuild2(0).get(); |
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.
j.buildAndAssertSuccess would hide some implementation details. Not important
👍 |
@olivergondza Regarding your comment... Do you want to get it fixed before the merge? |
@oleg-nenashev Yes, I'll fix it before merge. |
Slighty optimized and better legible asserts
👍 |
Please review, thx. Pavel