-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Stop tests from polluting maven settings #18525
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The pluginmanager tests modify `~/.m2/settings.xml`. Previously when that file exists it would be restored on test cleanup. However if that file did not exist prior to the tests, the file with nonsense values generated during testing would persist. This would cause subsequent issues when the pluginmanager or other systems that respect those maven settings. This commit updates the test to ensure the test file is deleted if it did not previously exist.
Contributor
🤖 GitHub commentsJust comment with:
|
Contributor
|
This pull request does not have a backport label. Could you fix it @donoghuc? 🙏
|
💚 Build Succeeded
|
robbavey
approved these changes
Dec 19, 2025
Member
robbavey
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Contributor
|
@Mergifyio backport 8.19 9.1 9.2 9.3 |
Contributor
✅ Backports have been createdDetails
|
mergify bot
pushed a commit
that referenced
this pull request
Dec 19, 2025
The pluginmanager tests modify `~/.m2/settings.xml`. Previously when that file exists it would be restored on test cleanup. However if that file did not exist prior to the tests, the file with nonsense values generated during testing would persist. This would cause subsequent issues when the pluginmanager or other systems that respect those maven settings. This commit updates the test to ensure the test file is deleted if it did not previously exist. (cherry picked from commit f36ba65)
mergify bot
pushed a commit
that referenced
this pull request
Dec 19, 2025
The pluginmanager tests modify `~/.m2/settings.xml`. Previously when that file exists it would be restored on test cleanup. However if that file did not exist prior to the tests, the file with nonsense values generated during testing would persist. This would cause subsequent issues when the pluginmanager or other systems that respect those maven settings. This commit updates the test to ensure the test file is deleted if it did not previously exist. (cherry picked from commit f36ba65)
This was referenced Dec 19, 2025
mergify bot
pushed a commit
that referenced
this pull request
Dec 19, 2025
The pluginmanager tests modify `~/.m2/settings.xml`. Previously when that file exists it would be restored on test cleanup. However if that file did not exist prior to the tests, the file with nonsense values generated during testing would persist. This would cause subsequent issues when the pluginmanager or other systems that respect those maven settings. This commit updates the test to ensure the test file is deleted if it did not previously exist. (cherry picked from commit f36ba65)
mergify bot
pushed a commit
that referenced
this pull request
Dec 19, 2025
The pluginmanager tests modify `~/.m2/settings.xml`. Previously when that file exists it would be restored on test cleanup. However if that file did not exist prior to the tests, the file with nonsense values generated during testing would persist. This would cause subsequent issues when the pluginmanager or other systems that respect those maven settings. This commit updates the test to ensure the test file is deleted if it did not previously exist. (cherry picked from commit f36ba65)
donoghuc
added a commit
that referenced
this pull request
Dec 22, 2025
The pluginmanager tests modify `~/.m2/settings.xml`. Previously when that file exists it would be restored on test cleanup. However if that file did not exist prior to the tests, the file with nonsense values generated during testing would persist. This would cause subsequent issues when the pluginmanager or other systems that respect those maven settings. This commit updates the test to ensure the test file is deleted if it did not previously exist. (cherry picked from commit f36ba65) Co-authored-by: Cas Donoghue <[email protected]>
donoghuc
added a commit
that referenced
this pull request
Dec 22, 2025
The pluginmanager tests modify `~/.m2/settings.xml`. Previously when that file exists it would be restored on test cleanup. However if that file did not exist prior to the tests, the file with nonsense values generated during testing would persist. This would cause subsequent issues when the pluginmanager or other systems that respect those maven settings. This commit updates the test to ensure the test file is deleted if it did not previously exist. (cherry picked from commit f36ba65) Co-authored-by: Cas Donoghue <[email protected]>
donoghuc
added a commit
that referenced
this pull request
Dec 22, 2025
The pluginmanager tests modify `~/.m2/settings.xml`. Previously when that file exists it would be restored on test cleanup. However if that file did not exist prior to the tests, the file with nonsense values generated during testing would persist. This would cause subsequent issues when the pluginmanager or other systems that respect those maven settings. This commit updates the test to ensure the test file is deleted if it did not previously exist. (cherry picked from commit f36ba65) Co-authored-by: Cas Donoghue <[email protected]>
donoghuc
added a commit
that referenced
this pull request
Dec 22, 2025
The pluginmanager tests modify `~/.m2/settings.xml`. Previously when that file exists it would be restored on test cleanup. However if that file did not exist prior to the tests, the file with nonsense values generated during testing would persist. This would cause subsequent issues when the pluginmanager or other systems that respect those maven settings. This commit updates the test to ensure the test file is deleted if it did not previously exist. (cherry picked from commit f36ba65) Co-authored-by: Cas Donoghue <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Release notes
[rn:skip]
What does this PR do?
The pluginmanager tests modify
~/.m2/settings.xml. Previously when that file exists it would be restored on test cleanup. However if that file did not exist prior to the tests, the file with nonsense values generated during testing would persist. This would cause subsequent issues when the pluginmanager or other systems that respect those maven settings. This commit updates the test to ensure the test file is deleted if it did not previously exist.Previously any developer who run the tests locally and did not have an existing
~/.m2/settings.xmlwould get a file with nonsense proxies which would break the pluginmanager's ability to download jar dependencies of gems.NOTE: Fortunately this did not affect logstash artifact creation because we do testing/packaging on separate hosts.
How to test this PR locally
Logs
Previously the tests would leave behing a file like:
This would cause issues with the pluginmanager when jar-dependencies need to dowload jars for gem installation. Unfortunately that is masked because of retry logic (the jar is failed to be downlaoded but the rest of the gem code is, so on the second retry the pluginmanager thinks the complete gem has been installed).