Skip to content
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

Introduce new JenkinsRule#buildAndAssertStatus() method #167

Merged

Conversation

slonopotamus
Copy link
Contributor

This is identical to JenkinsRule.buildAndAssertSuccess but with user-specified build status

Copy link
Member

@oleg-nenashev oleg-nenashev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! It would be also nice to have some Javadoc with @since so that users can discover new API easily

@oleg-nenashev oleg-nenashev changed the title Introduce JenkinsRule.buildAndAssertStatus Introduce new JenkinsRule#buildAndAssertStatus() method Oct 8, 2019
This is identical to `JenkinsRule#buildAndAssertSuccess` but with user-specified build status
@slonopotamus
Copy link
Contributor Author

Done. I've also adjusted generics a bit so it now works without unchecked cast. This might break compilation of some tests that were giving something that is a Job but is not a ParameterizedJobMixIn.ParameterizedJob but such cases would fail with assert anyway.

@oleg-nenashev oleg-nenashev merged commit 0d21041 into jenkinsci:master Oct 9, 2019
@oleg-nenashev
Copy link
Member

Thanks!

@daniel-beck
Copy link
Member

This breaks with any newer core dependency. If you

$ git diff
diff --git a/pom.xml b/pom.xml
index c63b60d..586a3dd 100644
--- a/pom.xml
+++ b/pom.xml
@@ -85,7 +85,7 @@ THE SOFTWARE.
     <dependency>
       <groupId>org.jenkins-ci.main</groupId>
       <artifactId>jenkins-war</artifactId>
-      <version>2.60.3</version>
+      <version>2.73.3</version>
       <type>executable-war</type>
       <exclusions>
         <exclusion>

then you get

JenkinsRule.java:[1377,64] type argument J is not within bounds of type-variable JobT

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants