Use build parameters as resource, label and number. #214
ci.jenkins.io / Tests / windows-17 / Build (windows-17)
failed
Oct 21, 2024
org.jenkins.plugins.lockableresources.FreeStyleProjectTest.parallelResourceFromParameter failed
Send us feedback
Details
org.jenkins.plugins.lockableresources.FreeStyleProjectTest.parallelResourceFromParameter
Expected: a string containing "released lock on [resource1]"
but: was "Started
Running as SYSTEM
[lockable-resources] acquired lock on [resource1]
Building in workspace C:\Jenkins\agent\workspace\lockable-resources-plugin_PR-214\target\tmp\j h11327397704836230550\workspace\f
Waiting...
Continue
Finished: SUCCESS
"
Stack trace
java.lang.AssertionError:
Expected: a string containing "released lock on [resource1]"
but: was "Started
Running as SYSTEM
[lockable-resources] acquired lock on [resource1]
Building in workspace C:\Jenkins\agent\workspace\lockable-resources-plugin_PR-214\target\tmp\j h11327397704836230550\workspace\f
Waiting...
Continue
Finished: SUCCESS
"
at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:6)
at org.jvnet.hudson.test.JenkinsRule.assertLogContains(JenkinsRule.java:1570)
at org.jvnet.hudson.test.JenkinsRule.waitForMessage(JenkinsRule.java:1630)
at org.jenkins.plugins.lockableresources.FreeStyleProjectTest.parallelResourceFromParameter(FreeStyleProjectTest.java:362)
at java.base/java.lang.reflect.Method.invoke(Method.java:569)
at org.jvnet.hudson.test.JenkinsRule$1.evaluate(JenkinsRule.java:655)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.lang.Thread.run(Thread.java:840)
Suppressed: java.io.IOException: C:\Jenkins\agent\workspace\lockable-resources-plugin_PR-214\target\tmp\j h11327397704836230550\jobs\f\builds\3\atomic10894485190840161835tmp
at org.jvnet.hudson.test.TemporaryDirectoryAllocator.delete(TemporaryDirectoryAllocator.java:144)
at org.jvnet.hudson.test.TemporaryDirectoryAllocator.delete(TemporaryDirectoryAllocator.java:131)
at org.jvnet.hudson.test.TemporaryDirectoryAllocator.delete(TemporaryDirectoryAllocator.java:131)
at org.jvnet.hudson.test.TemporaryDirectoryAllocator.delete(TemporaryDirectoryAllocator.java:131)
at org.jvnet.hudson.test.TemporaryDirectoryAllocator.delete(TemporaryDirectoryAllocator.java:131)
at org.jvnet.hudson.test.TemporaryDirectoryAllocator.dispose(TemporaryDirectoryAllocator.java:99)
at org.jvnet.hudson.test.TestEnvironment.dispose(TestEnvironment.java:84)
at org.jvnet.hudson.test.JenkinsRule.after(JenkinsRule.java:535)
at org.jvnet.hudson.test.JenkinsRule$1.evaluate(JenkinsRule.java:673)
... 2 more
Caused by: java.nio.file.DirectoryNotEmptyException: C:\Jenkins\agent\workspace\lockable-resources-plugin_PR-214\target\tmp\j h11327397704836230550\jobs\f\builds\3
at java.base/sun.nio.fs.WindowsFileSystemProvider.implDelete(WindowsFileSystemProvider.java:272)
at java.base/sun.nio.fs.AbstractFileSystemProvider.deleteIfExists(AbstractFileSystemProvider.java:110)
at java.base/java.nio.file.Files.deleteIfExists(Files.java:1191)
at org.jvnet.hudson.test.TemporaryDirectoryAllocator.delete(TemporaryDirectoryAllocator.java:141)
... 10 more
Standard error
0.057 [id=353] INFO o.jvnet.hudson.test.JenkinsRule#createWebServer: Running on http://localhost:49250/jenkins/
1.788 [id=366] INFO jenkins.InitReactorRunner$1#onAttained: Started initialization
1.793 [id=368] INFO jenkins.InitReactorRunner$1#onAttained: Listed all plugins
1.802 [id=369] INFO j.b.api.BouncyCastlePlugin#start: C:\Jenkins\agent\workspace\lockable-resources-plugin_PR-214\target\tmp\j h11327397704836230550\plugins\bouncycastle-api\WEB-INF\optional-lib not found; for non RealJenkinsRule this is fine and can be ignored.
2.483 [id=366] INFO jenkins.InitReactorRunner$1#onAttained: Prepared all plugins
2.490 [id=368] INFO jenkins.InitReactorRunner$1#onAttained: Started all plugins
2.493 [id=372] INFO jenkins.InitReactorRunner$1#onAttained: Augmented all extensions
8.290 [id=370] INFO jenkins.InitReactorRunner$1#onAttained: System config loaded
8.342 [id=367] INFO jenkins.InitReactorRunner$1#onAttained: System config adapted
8.343 [id=365] INFO jenkins.InitReactorRunner$1#onAttained: Loaded all jobs
8.343 [id=365] INFO o.j.p.l.NodesMirror#createNodeResources: lockable-resources-plugin: configure node resources
8.344 [id=366] INFO jenkins.InitReactorRunner$1#onAttained: Configuration for all jobs updated
8.460 [id=368] INFO jenkins.InitReactorRunner$1#onAttained: Completed initialization
8.845 [id=374] INFO o.j.p.l.queue.LockRunListener#onStarted: f #1 acquired lock on [resource1]
9.179 [id=373] INFO o.j.p.l.queue.LockRunListener#onStarted: f #2 acquired lock on [resource2]
9.280 [id=353] INFO o.j.p.l.TestHelpers#waitForQueue: Waiting for job to be queued...
9.474 [id=373] INFO o.j.p.l.queue.LockRunListener#onCompleted: f #2
9.527 [id=374] INFO o.j.p.l.queue.LockRunListener#onCompleted: f #1
9.576 [id=392] INFO o.j.p.l.queue.LockRunListener#onStarted: f #3 acquired lock on [resource1]
9.594 [id=353] WARNING o.j.h.t.RemainingActivityListener#onTearDown: f #3 still seems to be running, which could break deletion of log files or metadata
9.598 [id=353] INFO hudson.lifecycle.Lifecycle#onStatusUpdate: Stopping Jenkins
9.610 [id=392] INFO hudson.model.Run#execute: f #3 aborted
java.lang.InterruptedException
at java.base/java.lang.Object.wait(Native Method)
at java.base/java.lang.Object.wait(Object.java:338)
at org.jenkins.plugins.lockableresources.FreeStyleProjectTest$WaitBuilder.perform(FreeStyleProjectTest.java:495)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:818)
at hudson.model.Build$BuildExecution.build(Build.java:199)
at hudson.model.Build$BuildExecution.doRun(Build.java:164)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:526)
at hudson.model.Run.execute(Run.java:1895)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:44)
at hudson.model.ResourceController.execute(ResourceController.java:101)
at hudson.model.Executor.run(Executor.java:442)
9.642 [id=353] INFO hudson.lifecycle.Lifecycle#onStatusUpdate: Jenkins stopped
9.888 [id=353] INFO o.j.h.t.TemporaryDirectoryAllocator#dispose: deleting C:\Jenkins\agent\workspace\lockable-resources-plugin_PR-214\target\tmp\j h11327397704836230550
9.909 [id=392] INFO o.j.p.l.queue.LockRunListener#onCompleted: f #3
9.911 [id=392] WARNING jenkins.util.Listeners#lambda$notify$0
java.lang.IllegalStateException: Jenkins.instance is missing. Read the documentation of Jenkins.getInstanceOrNull to see what you are doing wrong.
at jenkins.model.Jenkins.get(Jenkins.java:819)
at org.jenkins.plugins.lockableresources.LockableResourcesManager.get(LockableResourcesManager.java:1384)
at org.jenkins.plugins.lockableresources.queue.LockRunListener.onCompleted(LockRunListener.java:102)
at hudson.model.listeners.RunListener.lambda$fireCompleted$0(RunListener.java:207)
at jenkins.util.Listeners.lambda$notify$0(Listeners.java:59)
at jenkins.util.Listeners.notify(Listeners.java:67)
at hudson.model.listeners.RunListener.fireCompleted(RunListener.java:205)
at hudson.model.Run.execute(Run.java:1936)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:44)
at hudson.model.ResourceController.execute(ResourceController.java:101)
at hudson.model.Executor.run(Executor.java:442)
9.911 [id=392] WARNING hudson.model.Descriptor#toMap
java.lang.IllegalStateException: Jenkins.instance is missing. Read the documentation of Jenkins.getInstanceOrNull to see what you are doing wrong.
at jenkins.model.Jenkins.get(Jenkins.java:819)
at hudson.model.JobProperty.getDescriptor(JobProperty.java:101)
at jenkins.model.OptionalJobProperty.getDescriptor(OptionalJobProperty.java:43)
at jenkins.model.OptionalJobProperty.getDescriptor(OptionalJobProperty.java:39)
at hudson.model.Descriptor.toMap(Descriptor.java:1031)
at hudson.model.Job.getProperties(Job.java:558)
at hudson.model.Build$BuildExecution.cleanUp(Build.java:190)
at hudson.model.Run.execute(Run.java:1938)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:44)
at hudson.model.ResourceController.execute(ResourceController.java:101)
at hudson.model.Executor.run(Executor.java:442)
9.911 [id=392] WARNING hudson.model.Descriptor#toMap
java.lang.IllegalStateException: Jenkins.instance is missing. Read the documentation of Jenkins.getInstanceOrNull to see what you are doing wrong.
at jenkins.model.Jenkins.get(Jenkins.java:819)
at hudson.model.JobProperty.getDescriptor(JobProperty.java:101)
at hudson.model.JobProperty.getDescriptor(JobProperty.java:78)
at hudson.model.Descriptor.toMap(Descriptor.java:1031)
at hudson.model.Job.getProperties(Job.java:558)
at hudson.model.Build$BuildExecution.cleanUp(Build.java:190)
at hudson.model.Run.execute(Run.java:1938)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:44)
at hudson.model.ResourceController.execute(ResourceController.java:101)
at hudson.model.Executor.run(Executor.java:442)
9.917 [id=392] FINEST hudson.XmlFile#write: Writing C:\Jenkins\agent\workspace\lockable-resources-plugin_PR-214\target\tmp\j h11327397704836230550\jobs\f\builds\3\build.xml
java.lang.Throwable
at hudson.XmlFile.write(XmlFile.java:205)
at hudson.model.Run.save(Run.java:2062)
at hudson.model.Run.execute(Run.java:1948)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:44)
at hudson.model.ResourceController.execute(ResourceController.java:101)
at hudson.model.Executor.run(Executor.java:442)
9.937 [id=392] WARNING hudson.util.AtomicFileWriter#commit: Unable to move atomically, falling back to non-atomic move.
java.nio.file.NoSuchFileException: C:\Jenkins\agent\workspace\lockable-resources-plugin_PR-214\target\tmp\j h11327397704836230550\jobs\f\builds\3\atomic10894485190840161835tmp -> C:\Jenkins\agent\workspace\lockable-resources-plugin_PR-214\target\tmp\j h11327397704836230550\jobs\f\builds\3\build.xml
at java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:85)
at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103)
at java.base/sun.nio.fs.WindowsFileCopy.move(WindowsFileCopy.java:317)
at java.base/sun.nio.fs.WindowsFileSystemProvider.move(WindowsFileSystemProvider.java:293)
at java.base/java.nio.file.Files.move(Files.java:1432)
at hudson.util.AtomicFileWriter.commit(AtomicFileWriter.java:211)
at hudson.XmlFile.write(XmlFile.java:221)
at hudson.model.Run.save(Run.java:2062)
at hudson.model.Run.execute(Run.java:1948)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:44)
at hudson.model.ResourceController.execute(ResourceController.java:101)
at hudson.model.Executor.run(Executor.java:442)
9.938 [id=392] WARNING hudson.util.AtomicFileWriter#commit: Unable to move C:\Jenkins\agent\workspace\lockable-resources-plugin_PR-214\target\tmp\j h11327397704836230550\jobs\f\builds\3\atomic10894485190840161835tmp to C:\Jenkins\agent\workspace\lockable-resources-plugin_PR-214\target\tmp\j h11327397704836230550\jobs\f\builds\3\build.xml. Attempting to delete C:\Jenkins\agent\workspace\lockable-resources-plugin_PR-214\target\tmp\j h11327397704836230550\jobs\f\builds\3\atomic10894485190840161835tmp and abandoning.
9.938 [id=392] SEVERE hudson.model.Run#execute: Failed to save build record
Also: java.nio.file.NoSuchFileException: C:\Jenkins\agent\workspace\lockable-resources-plugin_PR-214\target\tmp\j h11327397704836230550\jobs\f\builds\3\atomic10894485190840161835tmp -> C:\Jenkins\agent\workspace\lockable-resources-plugin_PR-214\target\tmp\j h11327397704836230550\jobs\f\builds\3\build.xml
at java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:85)
at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103)
at java.base/sun.nio.fs.WindowsFileCopy.move(WindowsFileCopy.java:317)
at java.base/sun.nio.fs.WindowsFileSystemProvider.move(WindowsFileSystemProvider.java:293)
at java.base/java.nio.file.Files.move(Files.java:1432)
at hudson.util.AtomicFileWriter.commit(AtomicFileWriter.java:211)
java.nio.file.NoSuchFileException: C:\Jenkins\agent\workspace\lockable-resources-plugin_PR-214\target\tmp\j h11327397704836230550\jobs\f\builds\3\atomic10894485190840161835tmp
at java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:85)
at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103)
at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:108)
at java.base/sun.nio.fs.WindowsFileCopy.move(WindowsFileCopy.java:334)
at java.base/sun.nio.fs.WindowsFileSystemProvider.move(WindowsFileSystemProvider.java:293)
at java.base/java.nio.file.Files.move(Files.java:1432)
at hudson.util.AtomicFileWriter.commit(AtomicFileWriter.java:226)
at hudson.XmlFile.write(XmlFile.java:221)
at hudson.model.Run.save(Run.java:2062)
at hudson.model.Run.execute(Run.java:1948)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:44)
at hudson.model.ResourceController.execute(ResourceController.java:101)
at hudson.model.Executor.run(Executor.java:442)
Standard out
=== Starting parallelResourceFromParameter(org.jenkins.plugins.lockableresources.FreeStyleProjectTest)
Loading