Skip to content

Commit

Permalink
work around nunit issue grpc#1406
Browse files Browse the repository at this point in the history
  • Loading branch information
jtattermusch committed Apr 12, 2016
1 parent d550ad1 commit 2f0519e
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/csharp/Grpc.Core.Tests/NUnitMain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@

using System;
using System.Reflection;
using Grpc.Core;
using Grpc.Core.Logging;
using NUnit.Common;
using NUnitLite;

Expand All @@ -45,6 +47,8 @@ public class NUnitMain
{
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
Expand Down
4 changes: 4 additions & 0 deletions src/csharp/Grpc.Examples.Tests/NUnitMain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@

using System;
using System.Reflection;
using Grpc.Core;
using Grpc.Core.Logging;
using NUnit.Common;
using NUnitLite;

Expand All @@ -45,6 +47,8 @@ public class NUnitMain
{
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
Expand Down
4 changes: 4 additions & 0 deletions src/csharp/Grpc.HealthCheck.Tests/NUnitMain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@

using System;
using System.Reflection;
using Grpc.Core;
using Grpc.Core.Logging;
using NUnit.Common;
using NUnitLite;

Expand All @@ -45,6 +47,8 @@ public class NUnitMain
{
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
Expand Down
4 changes: 4 additions & 0 deletions src/csharp/Grpc.IntegrationTesting/NUnitMain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@

using System;
using System.Reflection;
using Grpc.Core;
using Grpc.Core.Logging;
using NUnit.Common;
using NUnitLite;

Expand All @@ -45,6 +47,8 @@ public class NUnitMain
{
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
Expand Down

0 comments on commit 2f0519e

Please sign in to comment.