Delete builds in QueueTest to prevent Windows test failures#26104
Delete builds in QueueTest to prevent Windows test failures#26104MarkEWaite merged 2 commits intojenkinsci:masterfrom
Conversation
No one is reading the test logs. They add megabytes to the output and may obscure useful messages.
…ailures The Windows file system prevents cleanup of the builds and jobs directory while the test has them open. Stopping the builds and deleting them is enough to close the directory and allow it to be deleted. Testing done: * Before this change, testGetCauseOfBlockageForNonConcurrentFreestyle failed in about 50% of runs on my 7 different Windows agents * After this change, testGetCauseOfBlockageForNonConcurrentFreestyle passes all runs on my 7 different Windows agents
|
@alecharp would you be willing to review this improvement to the test? I'd really like to reduce the flakiness of QueueTest.testGetCauseOfBlockageForNonConcurrentFreestyle on Windows. |
There was a problem hiding this comment.
Pull request overview
This PR fixes Windows test failures in QueueTest by properly cleaning up build resources and removes noisy debug logging. The changes address file system locking issues on Windows that prevented proper cleanup of build directories during test execution, reducing test execution time from 30 seconds to under 2 seconds.
Changes:
- Removed unused debug logging infrastructure (LogRecorder field and related imports)
- Removed noisy System.out.println statements that printed queue.xml and build.xml contents
- Modified testGetCauseOfBlockageForNonConcurrentFreestyle to explicitly stop and delete builds for proper cleanup
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
The analysis in the Copilot session matches with my analysis from code review and multiple test runs. Very nice! |

Delete builds in QueueTest to prevent Windows test failures
The Windows file system prevents cleanup of the builds and jobs directories while the test has them open. Stopping the builds and deleting them is enough to close the directories and allow them to be deleted.
Also removes noisy test logging from QueueTest because no one is reading the test logs. They add megabytes to the output and may obscure useful messages.
This pull request improves the execution time of the modified test. The test previously required 30 seconds to complete. It now completes in less than 2 seconds.
Testing done
Proposed changelog entries
Proposed changelog category
/label skip-changelog
Proposed upgrade guidelines
N/A
Submitter checklist
New public classes, fields, and methods are annotated with@Restrictedor have@since TODOJavadocs, as appropriate.New deprecations are annotated with@Deprecated(since = "TODO")or@Deprecated(forRemoval = true, since = "TODO"), if applicable.UI changes do not introduce regressions when enforcing the current default rules of Content Security Policy Plugin. In particular, new or substantially changed JavaScript is not defined inline and does not callevalto ease future introduction of Content Security Policy (CSP) directives (see documentation).For dependency updates, there are links to external changelogs and, if possible, full differentials.For new APIs and extension points, there is a link to at least one consumer.Desired reviewers
N/A
Before the changes are marked as
ready-for-merge:Maintainer checklist
upgrade-guide-neededlabel is set and there is a Proposed upgrade guidelines section in the pull request title (see example).lts-candidateto be considered.