From cbef74f6cb7b7c797a5815caa76b020487d83097 Mon Sep 17 00:00:00 2001 From: E M <5089238+emizzle@users.noreply.github.com> Date: Thu, 30 Apr 2026 15:53:14 +1000 Subject: [PATCH] Auto-flush stdout in an attempt to get NUnit's output in the logs --- Tests/DistTestCore/Global.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Tests/DistTestCore/Global.cs b/Tests/DistTestCore/Global.cs index 9ecaaafa..c35f53d1 100644 --- a/Tests/DistTestCore/Global.cs +++ b/Tests/DistTestCore/Global.cs @@ -32,6 +32,12 @@ namespace DistTestCore public void Setup() { + // Console.Out is block-buffered when stdout is non-interactive (e.g. in a container). + // Replace it with an auto-flushing wrapper so the NUnit runner's own "Passed/Failed" + // progress lines are written to pod stdout immediately after each test completes, + // rather than batching until process exit. + Console.SetOut(new StreamWriter(Console.OpenStandardOutput()) { AutoFlush = true }); + try { Trace.Listeners.Add(new ConsoleTraceListener());