Skip to content

fix: Do not set console buffer width (ConsoleLogger) - #1623

Merged
HofmeisterAn merged 2 commits into
developfrom
bugfix/do-not-set-console-buffer-width
Jan 17, 2026
Merged

HofmeisterAn merged 2 commits into
developfrom
bugfix/do-not-set-console-buffer-width

Conversation

@HofmeisterAn

@HofmeisterAn HofmeisterAn commented Jan 17, 2026 •

Copy link
Copy Markdown
Collaborator

What does this PR do?

It looks like setting the console buffer width can cause issues in some environments, and according to the docs, using this API is not recommended. I no longer remember why we added it. I ran a few simple tests and didn't encounter any obvious issues, so I think it's safe to remove it to avoid potential problems.

Why is it important?

-

Related issues

Summary by CodeRabbit

  • Refactor
    • Simplified console logger implementation by removing Windows-specific buffer width handling.
    • Updated internal documentation formatting.

✏️ Tip: You can customize this high-level summary in your review settings.

@HofmeisterAn HofmeisterAn added the bug Something isn't working label Jan 17, 2026
@netlify

netlify Bot commented Jan 17, 2026 •

Copy link
Copy Markdown

βœ… Deploy Preview for testcontainers-dotnet ready!

Name Link
πŸ”¨ Latest commit ae605a8
πŸ” Latest deploy log https://app.netlify.com/projects/testcontainers-dotnet/deploys/696b50a4dceccd00089196de
😎 Deploy Preview https://deploy-preview-1623--testcontainers-dotnet.netlify.app
πŸ“± Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai

coderabbitai Bot commented Jan 17, 2026 •

Copy link
Copy Markdown

Walkthrough

The ConsoleLogger class was modified to remove problematic Windows-specific buffer width adjustment that was interfering with Microsoft Testing Platform output. The unnecessary System.Runtime.InteropServices dependency was removed, and documentation comments were updated.

Changes

Cohort / File(s) Summary
ConsoleLogger bug fix
src/Testcontainers/Logger.cs
Removed Console.BufferWidth adjustment that was causing output distortion in Microsoft Testing Platform; removed unused System.Runtime.InteropServices directive; updated documentation comments with formatting tags.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 A buffer too wide caused display to break,
So out came the offending line we'd makeβ€”
Now platforms dance in harmony so true,
No skewing, no chaos, just clean output through! 🌟

πŸš₯ Pre-merge checks | βœ… 4 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
βœ… Passed checks (4 passed)
Check name Status Explanation
Title check βœ… Passed The title clearly and concisely describes the main change: removing console buffer width setting from ConsoleLogger.
Description check βœ… Passed The description covers the WHAT and includes a related issue link, but the WHY section is incomplete (marked with a dash) and testing instructions are missing.
Linked Issues check βœ… Passed The PR fully addresses the objective from issue #1620 by removing the Console.BufferWidth assignment that was causing output skewing in Microsoft Testing Platform.
Out of Scope Changes check βœ… Passed All changes are directly related to the stated objective: removing console buffer width handling and the associated using directive are within scope of issue #1620.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • πŸ“ Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❀️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@HofmeisterAn
HofmeisterAn merged commit f56b58b into develop Jan 17, 2026
80 checks passed
@HofmeisterAn
HofmeisterAn deleted the bugfix/do-not-set-console-buffer-width branch January 17, 2026 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: ConsoleLogger skews Microsoft Testing Platform output

1 participant