-
Notifications
You must be signed in to change notification settings - Fork 394
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
Compatibility with Groovy 4 #521
Comments
I just tried to reproduce locally by copy/pasting your files into a new, empty project. It worked fine for me, using Ubuntu-ish Linux 21.10 and OpenJDK 1.8.0_312. |
With the same pom.xml? |
@andrefmarques Yep, copy pasted from the "details" part of the issue description above. |
I've tried on Lubuntu 22.04 and got the same issue. |
Sadly, I'm not certain. I don't use the declarative API for pipelines myself and am not terribly familiar with these test classes. If you like, I can upload a tarball of the example project based on your above code, just as a sanity check. Would that be useful @andrefmarques ? |
Yes, that would be great! |
Ok, here's my test project: test-project-thingy.tar.gz |
@andrefmarques just do not use Groovy 4. It is GroovyObjectHelper class which fails and which is introduced in version 4. |
@grzegorzgrzegorz is right, this is probably a Groovy 4 issue. I've renamed this issue accordingly. |
I am testing with Groovy 3.0.11 and everything works well. |
Please add a note to the Readme file to specifically state that JenkinsPipelineUnit is not compatible with Groovy 4 |
@meelistolk Done, see #575 |
Excellent! |
Sorry about that. 😅 |
Hey is there any progress in this issue? |
On this issue, sorry, no. I can't speak for Jenkins itself, though. Last time I checked Jenkins still shipped with Groovy 2.4. |
Jenkins and plugins versions report
Environment
What Operating System are you using (both controller, and any agents involved in the problem)?
Fedora 36
java 1.8.0_302
Reproduction steps
I'm trying to run a DeclarativePipelineTest, file is TestDecExample.groovy
The Jenkins file is:
Then I run
mvn test
, same results with executing the test via IntellijExpected Results
The test runs and prints if it is successful or not.
Actual Results
The text was updated successfully, but these errors were encountered: