unify loggers used by Grpc tests

pull/12128/head
Jan Tattermusch 8 years ago
parent 1ca3bef6b6
commit ff6c03638d
  1. 2
      src/csharp/Grpc.Core.Tests/NUnitMain.cs
  2. 2
      src/csharp/Grpc.Examples.Tests/NUnitMain.cs
  3. 2
      src/csharp/Grpc.HealthCheck.Tests/NUnitMain.cs
  4. 2
      src/csharp/Grpc.IntegrationTesting/NUnitMain.cs
  5. 2
      src/csharp/Grpc.Microbenchmarks/Program.cs
  6. 2
      src/csharp/Grpc.Reflection.Tests/NUnitMain.cs

@ -33,7 +33,7 @@ namespace Grpc.Core.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));
GrpcEnvironment.SetLogger(new ConsoleLogger());
#if NETCOREAPP1_0
return new AutoRun(typeof(NUnitMain).GetTypeInfo().Assembly).Execute(args, new ExtendedTextWrapper(Console.Out), Console.In);
#else

@ -33,7 +33,7 @@ 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));
GrpcEnvironment.SetLogger(new ConsoleLogger());
#if NETCOREAPP1_0
return new AutoRun(typeof(NUnitMain).GetTypeInfo().Assembly).Execute(args, new ExtendedTextWrapper(Console.Out), Console.In);
#else

@ -33,7 +33,7 @@ namespace Grpc.HealthCheck.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));
GrpcEnvironment.SetLogger(new ConsoleLogger());
#if NETCOREAPP1_0
return new AutoRun(typeof(NUnitMain).GetTypeInfo().Assembly).Execute(args, new ExtendedTextWrapper(Console.Out), Console.In);
#else

@ -33,7 +33,7 @@ namespace Grpc.IntegrationTesting
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));
GrpcEnvironment.SetLogger(new ConsoleLogger());
#if NETCOREAPP1_0
return new AutoRun(typeof(NUnitMain).GetTypeInfo().Assembly).Execute(args, new ExtendedTextWrapper(Console.Out), Console.In);
#else

@ -27,7 +27,7 @@ namespace Grpc.Microbenchmarks
{
public static void Main(string[] args)
{
GrpcEnvironment.SetLogger(new TextWriterLogger(Console.Error));
GrpcEnvironment.SetLogger(new ConsoleLogger());
var benchmark = new SendMessageBenchmark();
benchmark.Init();
foreach (int threadCount in new int[] {1, 1, 2, 4, 8, 12})

@ -33,7 +33,7 @@ namespace Grpc.Reflection.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));
GrpcEnvironment.SetLogger(new ConsoleLogger());
#if NETCOREAPP1_0
return new AutoRun(typeof(NUnitMain).GetTypeInfo().Assembly).Execute(args, new ExtendedTextWrapper(Console.Out), Console.In);
#else

Loading…
Cancel
Save