Skip to content

fix: use correct package list for non-sudo test results in Windows ru…#13592

Open
calancha wants to merge 1 commit intoelastic:mainfrom
calancha:issue-13545-fix-run-until-failure
Open

fix: use correct package list for non-sudo test results in Windows ru…#13592
calancha wants to merge 1 commit intoelastic:mainfrom
calancha:issue-13545-fix-run-until-failure

Conversation

@calancha
Copy link
Copy Markdown

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.SudoTests to runTestsOnWindows
instead of batch.Tests for result collection.

This one-line change (batch.SudoTests -> batch.Tests) ensures
non-sudo test results are collected using the correct package list.

Why is it important?

When TEST_RUN_UNTIL_FAILURE=true is used, the framework should stop
as 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 read and understood the pull request guidelines of this project.
  • My code follows the style guidelines of this project
  • [ ] 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/fragments using the changelog tool
  • [ ] I have added an integration test or an E2E test

Disruptive 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. A
failing non-sudo test should now stop the loop instead of continuing
indefinitely:

TEST_RUN_UNTIL_FAILURE=true AGENT_VERSION="9.4.0-SNAPSHOT" TEST_PLATFORMS="windows/amd64" mage -v integration:single TestFilebeatReceiverLogAsFilestream

Related issues

Questions to ask yourself

  • How are we going to support this in production? N/A - test framework fix
  • How are we going to measure its adoption? N/A
  • How are we going to debug this? The fix is a single line; if issues arise, the diff is trivial to review
  • What are the metrics I should take care of? N/A

…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>
@calancha calancha requested a review from a team as a code owner April 12, 2026 19:22
@cla-checker-service
Copy link
Copy Markdown

❌ Author of the following commits did not sign a Contributor Agreement:
ae601df

Please, read and sign the above mentioned agreement if you want to contribute to this project

@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Apr 12, 2026

This pull request does not have a backport label. Could you fix it @calancha? 🙏
To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-./d./d is the label that automatically backports to the 8./d branch. /d is the digit
  • backport-active-all is the label that automatically backports to all active branches.
  • backport-active-8 is the label that automatically backports to all active minor branches for the 8 major.
  • backport-active-9 is the label that automatically backports to all active minor branches for the 9 major.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Integration tests framework] TEST_RUN_UNTIL_FAILURE=true does not stop running tests on failure

1 participant