Skip to content

generatedJenkinsTest (InjectedTest) fails when building plugin #236

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

Open
raleigh-rinehart opened this issue Jan 13, 2025 · 0 comments
Open

Comments

@raleigh-rinehart
Copy link

Jenkins and plugins versions report

Environment
Jenkins: 2.440.3
OS: Windows 11 - 10.0
Java: 17.0.13 - Eclipse Adoptium (OpenJDK 64-Bit Server VM)
---
bouncycastle-api:2.30.1.78.1-248.ve27176eb_46cb_
credentials:1380.va_435002fa_924
structs:338.v848422169819
ws-ctm:3.0.0.0

We have a Jenkins plugin that had dependencies on other plugins, namely the credentials, and struts plugins. These are declared as implementation deps in build.gradle. After updating to version 0.50 from 0.43 the build fails due to test failures because of "Plugin is missing" errors on the dependent plugins.

Including the dependencies as testImplementation deps does not make any difference.

What Operating System are you using (both controller, and any agents involved in the problem)?

Windows

Reproduction steps

  1. Build plugin with ./gradlew.bat build

Expected Results

Plugin builds without errors

Actual Results

build fails at PluginAutomaticTestBuilder$OtherTests. testPluginActive

> Task :generatedJenkinsTest

org.jenkinsci.plugins.generated.ws_ctm.InjectedTest > org.jvnet.hudson.test.PluginAutomaticTestBuilder$OtherTests.testPluginActive FAILED
    java.lang.AssertionError at PluginAutomaticTestBuilder.java:102
        Caused by: java.io.IOException at PluginWrapper.java:988

13 tests completed, 1 failed

> Task :generatedJenkinsTest FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':generatedJenkinsTest'.
> There were failing tests. See the report at:

Anything else?

Tests fail due to missing Jenkins plugin dependencies (credentials, and struts plugins)

java.lang.AssertionError: While testing ws-ctm, ws-ctm failed to start
	at org.jvnet.hudson.test.PluginAutomaticTestBuilder$OtherTests.testPluginActive(PluginAutomaticTestBuilder.java:102)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:569)
	at junit.framework.TestCase.runTest(TestCase.java:177)
...
Caused by: java.io.IOException: Failed to load: Worksoft Continuous Test Manager Plugin (ws-ctm 3.0.0.0)
 - Plugin is missing: credentials (1380.va_435002fa_924)
 - Plugin is missing: structs (338.v848422169819)
	at hudson.PluginWrapper.resolvePluginDependencies(PluginWrapper.java:988)
	at hudson.PluginManager$2$1$1.run(PluginManager.java:552)
	at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:177)
	at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:305)
	at jenkins.model.Jenkins$5.runTask(Jenkins.java:1170)
	at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:221)
	at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:120)
	at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	... 1 more

Are you interested in contributing a fix?

No response

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

No branches or pull requests

1 participant