diff --git a/src/csharp/Grpc.Core.Tests/ClientServerTest.cs b/src/csharp/Grpc.Core.Tests/ClientServerTest.cs index e3244711201..77f6a63156b 100644 --- a/src/csharp/Grpc.Core.Tests/ClientServerTest.cs +++ b/src/csharp/Grpc.Core.Tests/ClientServerTest.cs @@ -155,10 +155,7 @@ namespace Grpc.Core.Tests { helper.ServerStreamingHandler = new ServerStreamingServerMethod(async (request, responseStream, context) => { - foreach (string response in request.Split(new []{' '})) - { - await responseStream.WriteAsync(response); - } + await responseStream.WriteAllAsync(request.Split(new []{' '})); context.ResponseTrailers.Add("xyz", ""); });