Skip to content

fix: disable IDE streaming sink by default to prevent test runner crashes#4751

Merged
thomhurst merged 1 commit intomainfrom
fix/disable-ide-streaming-by-default
Feb 12, 2026
Merged

fix: disable IDE streaming sink by default to prevent test runner crashes#4751
thomhurst merged 1 commit intomainfrom
fix/disable-ide-streaming-by-default

Conversation

@thomhurst
Copy link
Owner

Summary

  • Disables IdeStreamingSink by default — it was causing crashes in Rider and VS Code when tests write to Console.WriteLine followed by an async delay
  • The root cause is the Microsoft Testing Platform's TestApplicationResult.ConsumeAsync throwing ArgumentException on duplicate TestNodeUid keys, triggered by the sink's output update + heartbeat pattern
  • The feature can be re-enabled via the TUNIT_ENABLE_IDE_STREAMING=1 environment variable for users who want real-time output streaming

Closes #4749

Test plan

  • Verify tests with Console.WriteLine + Task.Delay no longer crash in Rider/VS Code
  • Verify setting TUNIT_ENABLE_IDE_STREAMING=1 re-enables the streaming behavior
  • Verify test output is still visible in IDE test explorers after test completion (via ConsoleOutputSink / TestOutputSink)

🤖 Generated with Claude Code

…shes

The IdeStreamingSink causes crashes in Rider and VS Code due to the
Microsoft Testing Platform's TestApplicationResult.ConsumeAsync throwing
on duplicate TestNodeUid keys. Gate the feature behind the
TUNIT_ENABLE_IDE_STREAMING=1 environment variable so users can opt in.

Closes #4749

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@claude
Copy link
Contributor

claude bot commented Feb 12, 2026

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

This is a clean, well-scoped fix that:

  • Correctly addresses the IDE streaming sink crash issue by making it opt-in via environment variable
  • Uses appropriate string comparison for environment variable checking (defaults to disabled when not set)
  • Maintains all existing functionality with proper guard conditions
  • Includes clear documentation updates explaining the change and usage

The approach is sound: disabling a problematic feature by default while allowing users to enable it when needed is the right trade-off for stability.

@thomhurst thomhurst enabled auto-merge (squash) February 12, 2026 18:47
@thomhurst thomhurst disabled auto-merge February 12, 2026 19:08
@thomhurst thomhurst merged commit 5cf2feb into main Feb 12, 2026
12 of 13 checks passed
@thomhurst thomhurst deleted the fix/disable-ide-streaming-by-default branch February 12, 2026 19:08
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.

[Bug]: Rider & VScode console breaks in tunit 1.13.x

1 participant