fix: use correct package list for non-sudo test results in Windows ru…#13592
Open
calancha wants to merge 1 commit intoelastic:mainfrom
Open
fix: use correct package list for non-sudo test results in Windows ru…#13592calancha wants to merge 1 commit intoelastic:mainfrom
calancha wants to merge 1 commit intoelastic:mainfrom
Conversation
…nner The non-sudo path in WindowsRunner.Run was passing batch.SudoTests to runTestsOnWindows for result collection instead of batch.Tests. This caused non-sudo test failures to be masked, preventing TEST_RUN_UNTIL_FAILURE from stopping on failure. Closes elastic#13545 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
❌ Author of the following commits did not sign a Contributor Agreement: Please, read and sign the above mentioned agreement if you want to contribute to this project |
Contributor
|
This pull request does not have a backport label. Could you fix it @calancha? 🙏
|
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
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.
What does this PR do?
Fixes a bug in
WindowsRunner.Run(pkg/testing/windows/windows.go)where the non-sudo test path was passing
batch.SudoTeststorunTestsOnWindowsinstead of
batch.Testsfor result collection.This one-line change (
batch.SudoTests->batch.Tests) ensuresnon-sudo test results are collected using the correct package list.
Why is it important?
When
TEST_RUN_UNTIL_FAILURE=trueis used, the framework should stopas soon as a test fails. Because non-sudo results were collected from
the wrong package list, failures were masked and the loop never
stopped. This also caused test artifacts from failed runs to be
overwritten by subsequent runs, making debugging harder.
Checklist
[ ] I have commented my code, particularly in hard-to-understand areas[ ] I have made corresponding changes to the documentation[ ] I have made corresponding change to the default configuration files[ ] I have added tests that prove my fix is effective or that my feature works[ ] I have added an entry in./changelog/fragmentsusing the changelog tool[ ] I have added an integration test or an E2E testDisruptive User Impact
None. This only affects the integration test framework, not production code.
How to test this PR locally
Run integration tests on Windows with
TEST_RUN_UNTIL_FAILURE=true. Afailing non-sudo test should now stop the loop instead of continuing
indefinitely:
Related issues
TEST_RUN_UNTIL_FAILURE=truedoes not stop running tests on failure #13545Questions to ask yourself