Skip to content

Full test suite can leak ThrowingTextWriter into unrelated tests #2792

Description

@Widthdom

Summary

While attempting the full suite, multiple tests failed with:

ObjectDisposedException: Cannot access a disposed object.
Object name: 'ThrowingTextWriter'

The command used was:

dotnet test CodeIndex.sln -c Release -p:UseSharedCompilation=false --no-build

This appears to be existing Console state pollution: after a test installs/disposes ThrowingTextWriter, unrelated tests that write to Console can fail under parallel execution.

Expected

Console redirection tests should restore global state in a way that cannot leak into unrelated tests, or the affected tests should be isolated from parallel execution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions