Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
mgravell committed May 20, 2020
1 parent f7dc07a commit 0b16c10
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/protobuf-net.Grpc/Internal/Reshape.cs
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,8 @@ private static async IAsyncEnumerable<TResponse> ServerStreamingAsyncImpl<TReque
haveMore = await seq.MoveNext(cancellationToken).ConfigureAwait(false);
}
catch (RpcException fault)
{ // note: the RpcException doesn't seem to carry trailers in this case currently;
// leaving this here so that it gets fixed transparently if that ever changes
{ // note: the RpcException doesn't seem to carry trailers in the managed
// client; see https://github.com/grpc/grpc-dotnet/issues/915
metadata?.SetTrailers(fault);
throw;
}
Expand Down
9 changes: 4 additions & 5 deletions tests/protobuf-net.Grpc.Test.Integration/StreamTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,6 @@ async IAsyncEnumerable<Foo> IStreamAPI.ServerStreaming(Foo value, CallContext ct
if (i == fault)
{
var faultTrailers = new Metadata();
AddSum(ctx.ServerCallContext!.ResponseTrailers);
AddSum(faultTrailers);
throw new RpcException(new Status(StatusCode.Internal, "oops"), faultTrailers);
}
Expand Down Expand Up @@ -269,9 +268,9 @@ public class Foo
}


public class NativeStreamTestsFixture : StreamTests
public class NativeStreamTests : StreamTests
{
public NativeStreamTestsFixture(StreamTestsFixture fixture, ITestOutputHelper log) : base(10043, fixture, log) { }
public NativeStreamTests(StreamTestsFixture fixture, ITestOutputHelper log) : base(10043, fixture, log) { }
protected override IAsyncDisposable CreateClient(out IStreamAPI client)
{
var channel = new Channel("localhost", Port, ChannelCredentials.Insecure);
Expand All @@ -288,9 +287,9 @@ public DisposableChannel(Channel channel)
}

#if NETCOREAPP3_1
public class ManagedStreamTestsFixture : StreamTests
public class ManagedStreamTests : StreamTests
{
public ManagedStreamTestsFixture(StreamTestsFixture fixture, ITestOutputHelper log) : base(10044, fixture, log) { }
public ManagedStreamTests(StreamTestsFixture fixture, ITestOutputHelper log) : base(10044, fixture, log) { }
protected override IAsyncDisposable CreateClient(out IStreamAPI client)
{
var http = global::Grpc.Net.Client.GrpcChannel.ForAddress($"http://localhost:{Port}");
Expand Down

0 comments on commit 0b16c10

Please sign in to comment.