Skip to content

Commit 1c5cb28

Browse files
authored
Fix GetWithRouteParameter_WriteMultiple_CancellationBefore_CallCanceled (#41648)
1 parent 41dfc45 commit 1c5cb28

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/Grpc/JsonTranscoding/test/Microsoft.AspNetCore.Grpc.JsonTranscoding.IntegrationTests/ServerStreamingTests.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,8 @@ async Task ServerStreamingMethod(HelloRequest request, IServerStreamWriter<Hello
108108
// Assert 1
109109
Assert.Equal("Hello test 1!", result1.RootElement.GetProperty("message").GetString());
110110

111-
// Act 2
111+
// Act & Assert 2
112112
tcs.SetResult();
113-
var ex = await Assert.ThrowsAsync<IOException>(() => streamReader.ReadLineAsync());
114-
115-
// Assert 2
116-
Assert.Equal("The application aborted the request.", ex.InnerException!.Message);
113+
await Assert.ThrowsAsync<IOException>(() => streamReader.ReadLineAsync());
117114
}
118115
}

0 commit comments

Comments
 (0)