Skip to content

Conversation

@DaveTryon
Copy link
Contributor

When running dotnet test from the solution folder, the tests in the Microsoft.Sbom.Tool.Tests project will sometimes fail due to file collisions. Upon investigation, the files are question are output files of other projects, and are occurring because the tests in the Microsoft.Sbom.Tool.Tests are running while the other projects are still building.

To address this, I used Visual Studio's Project Dependencies feature to mark all of the other test projects as upstream dependencies of the Microsoft.Sbom.Tool.Tests project. This is the same pattern that was used in #957, but this time we add all test projects to be sure that Microsoft.Sbom.Tool.Tests is the very last project to build, making it impossible to run the tests while other projects are still building. Here's a screenshot of the Project Build Order as displayed by Visual Studio with this change:

image

@DaveTryon DaveTryon requested a review from a team as a code owner March 19, 2025 19:32
@DaveTryon
Copy link
Contributor Author

/azp run

@DaveTryon DaveTryon merged commit ee20a4e into main Mar 19, 2025
4 checks passed
@DaveTryon DaveTryon deleted the DaveTryon/fix-race-condition branch March 19, 2025 20:15
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.

3 participants