Skip to content
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

Break ControlsHeadlessTestRunner.RunTestsAsync method when discovering tests #19559

Merged
merged 1 commit into from Dec 22, 2023

Conversation

jfversluis
Copy link
Member

@jfversluis jfversluis commented Dec 22, 2023

Because of limitations on Windows/WinUI we have a bit of a complicated setup to run our tests there. There is a limit on the number of windows (actual desktop windows) we can spawn, if we hit the limit, the app crashes. That's why we broke up the running of tests per category.

The process is roughly: the Windows app gets started with a startup argument of -1, that means: go discover the tests. Then, each consecutive run will have a number starting at 0 and looping until the count of the categories discovered.

This was a bit flaky as can be seen in the linked issue. Seemingly because we weren't stopping the running of tests with the -1 option where we just want to discover the tests. Adding this condition makes this more stable.

Fixes #19463

@jfversluis jfversluis requested a review from a team as a code owner December 22, 2023 12:41
@jfversluis jfversluis changed the title Break ControlsHeadlessTestRunner.RunTestsAsync method when discovering tests Break ControlsHeadlessTestRunner.RunTestsAsync method when discovering tests Dec 22, 2023
@jfversluis jfversluis marked this pull request as draft December 22, 2023 13:26
@jfversluis jfversluis marked this pull request as ready for review December 22, 2023 14:09
@jfversluis jfversluis enabled auto-merge (squash) December 22, 2023 14:10
@jfversluis jfversluis merged commit 4b67c9e into main Dec 22, 2023
47 checks passed
@jfversluis jfversluis deleted the fix-19463 branch December 22, 2023 15:12
@github-actions github-actions bot locked and limited conversation to collaborators Jan 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[UITEst] Windows Controls Unpackaged occasionally crashes with IndexOutOfRangeException
2 participants