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

fix: NullReferenceException thrown when running tests in parallel #10181

Merged

Conversation

filzrev
Copy link
Contributor

@filzrev filzrev commented Sep 3, 2024

When running unit tests on Visual Studio TestExplorer.
NullReferenceException is thrown on some cases.

It's seems to be occurred when running following tests in parallel.

  1. UnitTest that use new TestListenerScope();
  2. UnitTest that try to write logs.

How to reproduce problems

  1. Select following tests on Visual Studio TestExplorer.
    1.1. TestLoaderWhenStandalonePreprocessorExists
    1.2. TestBadMdToc
  2. Run unit tests.

@yufeih yufeih added the bug-fix Makes the pull request to appear in "Bug Fixes" section of the next release note label Sep 14, 2024
@yufeih yufeih merged commit 3d477be into dotnet:main Sep 14, 2024
7 checks passed
@filzrev filzrev deleted the fix-nullreferenceexception-on-parallel-tests branch September 14, 2024 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-fix Makes the pull request to appear in "Bug Fixes" section of the next release note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants