-
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
Cannot run inline script when shared library is loaded #472
Comments
What is this play with "bug" label about? Should it not be used at all? Could you explain it @nre-ableton ? |
I removed all labels except for "dependabot", which gets added automatically by the dependabot service by GitHub and can't be avoided. The labels weren't useful and just cluttered up the backlog. |
I have encountered the same problem. Test which uses runScript('...') or runInlineScript('...') fails when library is loaded |
I have one suggestion. Check the groovy version you have on your classpath. It should be
That's first because this ancient version is what Jenkins actually uses, and second, when I used 3.0.12, I saw a deadlock when loading a shared library, when the test was trying to compile the groovy. Also, this is what JenkinsPipelineUnit tests with. JenkinsPipelineUnit has self tests for inlineScript functionality, https://github.com/RecuencoJones/JenkinsPipelineUnit/blob/master/src/test/groovy/com/lesfurets/jenkins/TestInlineScript.groovy so it is unlikely this will simply completely break. |
One more note, are you using Java 11 when running tests? I found that (with groovy 3.0.13) the tests run on java 11 and get stuck the way described in this issue on 17. My colleagues were perfectly happy with that version of groovy and java 11 and after I downgraded to 11, I am happy too. |
I am also experiencing this deadlock you mentioned when compiling the groovy from the shared library. If I downgrade to Groovy 2.4.21, I get -
which appears to only exist in the Java EE (enterprise edition), which I haven't look at how to install yet. If I downgrade to Java 11, I get -
which means the |
I have abstract class PipelineBase implements Serializable {
// ...
} GradlePipeline class GradlePipeline extends PipelineBase {
// ...
} If I remove the |
I have |
Amazing, upgrading |
Jenkins and plugins versions report
Environment
What Operating System are you using (both controller, and any agents involved in the problem)?
Windows
Reproduction steps
Unable to run this test:
Expected Results
Test is run, stack is displayed, assertion is made.
Actual Results
Test is hanging.
Anything else?
When library is not loaded, the test can be executed successfully.
The text was updated successfully, but these errors were encountered: