Skip to content

fix: Correct NodesMirror package and add label quantity regression tests#1028

Open
mPokornyETM wants to merge 3 commits intomasterfrom
fix/939-nodes-mirror-package-and-label-quantity-test
Open

fix: Correct NodesMirror package and add label quantity regression tests#1028
mPokornyETM wants to merge 3 commits intomasterfrom
fix/939-nodes-mirror-package-and-label-quantity-test

Conversation

@mPokornyETM
Copy link
Copy Markdown
Contributor

Summary

Two changes:

  1. Fix NodesMirror package declarationNodesMirror.java resides in the nodes/ subdirectory but declared package org.jenkins.plugins.lockableresources instead of org.jenkins.plugins.lockableresources.nodes. This corrects the package declaration and updates fully-qualified references in ConcurrentModificationExceptionTest and NodesMirrorTest.

  2. Add regression tests for [JENKINS-67083] Lockable resources plugin only uses 2 resources out of 3 #939 (JENKINS-67083) — three test scenarios covering the reported issue where only 2 out of 3 label-matched resources were allocated when 3 concurrent builds each requested lock(label: '...', quantity: 1). All tests pass, confirming the issue is no longer reproducible.

Test scenarios

Test Description
threeBuildsEachLockOneOfThreeResources 3 resources labeled imx8, 3 concurrent builds each lock(label: 'imx8', quantity: 1) — all must acquire concurrently
fourthBuildWaitsThenProceedsWhenResourceFreed 4 builds for 3 resources — 4th waits, then proceeds after one is released
threeBuildsGetDistinctResources Verifies each build gets a distinct Board_* resource via variable: 'LOCK_NAME'

Closes #939

…ture

NodesMirror.java resides in the nodes/ subdirectory but declared
package org.jenkins.plugins.lockableresources instead of
org.jenkins.plugins.lockableresources.nodes. Fix the package
declaration and update fully-qualified references in
ConcurrentModificationExceptionTest and NodesMirrorTest.
Add LockStepLabelQuantityOneTest with three test scenarios for
JENKINS-67083: 3 resources with the same label and 3 concurrent
builds each requesting quantity 1. All three tests pass, confirming
the issue is no longer reproducible.
@mPokornyETM mPokornyETM requested a review from a team as a code owner April 27, 2026 06:16
@github-actions github-actions Bot added bug java Pull requests that update Java code tests labels Apr 27, 2026
@mPokornyETM mPokornyETM added the merge-in-2-days-without-review Auto-approve countdown label Apr 27, 2026
@github-actions
Copy link
Copy Markdown
Contributor

⏸️ Auto-merge countdown PAUSED: CI checks are not passing. The countdown will resume when all checks are green.

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

Labels

bug java Pull requests that update Java code merge-in-2-days-without-review Auto-approve countdown tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[JENKINS-67083] Lockable resources plugin only uses 2 resources out of 3

1 participant