Skip to content

Fix failing test on Pipelines. Test only fails on Pipelines.#2141

Merged
jfversluis merged 3 commits into
CommunityToolkit:mainfrom
ne0rrmatrix:FixMediaElementTest
Aug 21, 2024
Merged

Fix failing test on Pipelines. Test only fails on Pipelines.#2141
jfversluis merged 3 commits into
CommunityToolkit:mainfrom
ne0rrmatrix:FixMediaElementTest

Conversation

@ne0rrmatrix
Copy link
Copy Markdown
Member

  • Bug fix

Description of Change

Fix failing test on Azure pipelines. it fails about 8 percent of the time. It has zero percent failure on my local machines. Passes on Mac mini and two different windows PC's. I have no idea why it only fails a small percentage of the time and only on Azure pipelines.

PR Checklist

Added attributes to ParentWindowTests to control test execution order:
- Disabled parallel execution with [CollectionDefinition(nameof(ParentWindowTests), DisableParallelization = true)]
- Ensured sequential execution with [Collection("Sequential")]

These changes help avoid issues related to shared state or resources.
@ne0rrmatrix
Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@ne0rrmatrix
Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@ne0rrmatrix ne0rrmatrix requested a review from jfversluis August 21, 2024 14:49
@jfversluis jfversluis merged commit 3e0ead0 into CommunityToolkit:main Aug 21, 2024
@GeorgeLeithead
Copy link
Copy Markdown
Contributor

Just to document against the PR. According to the xUnit.net documentation Configuration Files, the test project needs to copy the xunit.runner.json file to the build output directory for it to be used by the test runner, which it looks like we were not doing. Therefore we do not believe that the Azure test runner was abiding by out configuration and instead using defaults.

@TheCodeTraveler
Copy link
Copy Markdown
Collaborator

Thanks James!! I hope this does the trick!

It's been super annoying having to manually re-run our pipeline each time 😅

@GeorgeLeithead
Copy link
Copy Markdown
Contributor

We had a great community effort on the Discord server, lead by James @ne0rrmatrix.

@github-actions github-actions Bot locked and limited conversation to collaborators Nov 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants