Skip to content

Conversation

@jkotas
Copy link
Member

@jkotas jkotas commented Sep 27, 2025

XUnit test logs include arguments of theories. Replaced lengthy StringBuilder argument in System.IO.Tests with enum to avoid polluting log with it.

System.IO.Tests log size before this change: 2.5MB
System.IO.Tests log size after this change: 0,5MB

Copilot AI review requested due to automatic review settings September 27, 2025 02:37
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR optimizes XUnit test logging by replacing lengthy StringBuilder arguments with an enum in System.IO.Tests to prevent large test data from being included in test logs. The change reduces log size from 2.5MB to 0.5MB while maintaining the same test coverage.

  • Introduces TestStringBuilderKind enum to represent different StringBuilder test scenarios
  • Refactors test methods to accept the enum instead of StringBuilder directly
  • Adds helper method to generate StringBuilder instances based on the enum value

@github-actions github-actions bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Sep 27, 2025
@jkotas
Copy link
Member Author

jkotas commented Sep 27, 2025

I suspect that the long log file contributed to the build analysis missing the other System.IO.Tests failures in #117168 (comment)

@jkotas jkotas added area-System.IO and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels Sep 27, 2025
@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-system-io
See info in area-owners.md if you want to be subscribed.

@jkotas jkotas enabled auto-merge (squash) September 27, 2025 05:00
@jkotas jkotas merged commit 98f102a into dotnet:main Sep 27, 2025
91 checks passed
@jkotas jkotas deleted the system-io-tests-log branch September 27, 2025 05:26
@tarekgh tarekgh added this to the 11.0.0 milestone Sep 28, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Oct 28, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants