diff options
Diffstat (limited to 'src/csharp/Grpc.Examples.Tests/NUnitMain.cs')
-rw-r--r-- | src/csharp/Grpc.Examples.Tests/NUnitMain.cs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/csharp/Grpc.Examples.Tests/NUnitMain.cs b/src/csharp/Grpc.Examples.Tests/NUnitMain.cs index e6b76bcf3b..ea87802766 100644 --- a/src/csharp/Grpc.Examples.Tests/NUnitMain.cs +++ b/src/csharp/Grpc.Examples.Tests/NUnitMain.cs @@ -33,6 +33,8 @@ using System; using System.Reflection; +using Grpc.Core; +using Grpc.Core.Logging; using NUnit.Common; using NUnitLite; @@ -45,6 +47,8 @@ namespace Grpc.Examples.Tests { public static int Main(string[] args) { + // Make logger immune to NUnit capturing stdout and stderr to workaround https://github.com/nunit/nunit/issues/1406. + GrpcEnvironment.SetLogger(new TextWriterLogger(Console.Error)); #if DOTNET5_4 return new AutoRun(typeof(NUnitMain).GetTypeInfo().Assembly).Execute(args, new ExtendedTextWrapper(Console.Out), Console.In); #else |