diff options
-rw-r--r-- | src/csharp/Grpc.Core.Tests/Internal/AsyncCallTest.cs | 36 | ||||
-rw-r--r-- | src/csharp/Grpc.Core.Tests/ResponseHeadersTest.cs | 2 | ||||
-rw-r--r-- | src/csharp/Grpc.Core/GrpcEnvironment.cs | 1 | ||||
-rw-r--r-- | src/csharp/Grpc.Core/Internal/AsyncCall.cs | 1 | ||||
-rw-r--r-- | src/csharp/Grpc.Core/Internal/INativeCall.cs | 1 |
5 files changed, 4 insertions, 37 deletions
diff --git a/src/csharp/Grpc.Core.Tests/Internal/AsyncCallTest.cs b/src/csharp/Grpc.Core.Tests/Internal/AsyncCallTest.cs index 5747f3ba04..685c5f7d6c 100644 --- a/src/csharp/Grpc.Core.Tests/Internal/AsyncCallTest.cs +++ b/src/csharp/Grpc.Core.Tests/Internal/AsyncCallTest.cs @@ -33,9 +33,10 @@ using System; using System.Runtime.InteropServices; +using System.Threading.Tasks; + using Grpc.Core.Internal; using NUnit.Framework; -using System.Threading.Tasks; namespace Grpc.Core.Internal.Tests { @@ -87,38 +88,8 @@ namespace Grpc.Core.Internal.Tests Assert.AreEqual(StatusCode.Internal, ex.Status.StatusCode); } - - //[Test] - //public void Duplex_ReceiveEarlyClose() - //{ - // asyncCall.StartDuplexStreamingCall(); - - // fakeCall.ReceivedStatusOnClientHandler(true, new ClientSideStatus(new Status(StatusCode.DeadlineExceeded, ""), null)); - - // // TODO: start read... - // Assert.IsTrue(fakeCall.IsDisposed); - //} - - //[Test] - //public void Duplex_ReceiveEarlyCloseWithRead() - //{ - // asyncCall.StartDuplexStreamingCall(); - - // fakeCall.ReceivedStatusOnClientHandler(true, new ClientSideStatus(new Status(StatusCode.DeadlineExceeded, ""), null)); - - // var taskSource = new AsyncCompletionTaskSource<string>(); - // asyncCall.StartReadMessage(taskSource.CompletionDelegate); - - // fakeCall.ReceivedMessageHandler(true, new byte[] { 1 } ); - - // // TODO: start read... - // Assert.IsTrue(fakeCall.IsDisposed); - //} - - internal class FakeNativeCall : INativeCall { - public UnaryResponseClientHandler UnaryResponseClientHandler { get; @@ -247,8 +218,5 @@ namespace Grpc.Core.Internal.Tests IsDisposed = true; } } - } - - }
\ No newline at end of file diff --git a/src/csharp/Grpc.Core.Tests/ResponseHeadersTest.cs b/src/csharp/Grpc.Core.Tests/ResponseHeadersTest.cs index 76e36626b1..a1648f3671 100644 --- a/src/csharp/Grpc.Core.Tests/ResponseHeadersTest.cs +++ b/src/csharp/Grpc.Core.Tests/ResponseHeadersTest.cs @@ -125,7 +125,7 @@ namespace Grpc.Core.Tests var responseHeaders = await call.ResponseHeadersAsync; Assert.AreEqual("ascii-header", responseHeaders[0].Key); - CollectionAssert.AreEqual(new [] { "PASS" }, await call.ResponseStream.ToListAsync()); + CollectionAssert.AreEqual(new[] { "PASS" }, await call.ResponseStream.ToListAsync()); } [Test] diff --git a/src/csharp/Grpc.Core/GrpcEnvironment.cs b/src/csharp/Grpc.Core/GrpcEnvironment.cs index b64228558e..e7c04185c2 100644 --- a/src/csharp/Grpc.Core/GrpcEnvironment.cs +++ b/src/csharp/Grpc.Core/GrpcEnvironment.cs @@ -185,7 +185,6 @@ namespace Grpc.Core return Marshal.PtrToStringAnsi(ptr); } - internal static void GrpcNativeInit() { grpcsharp_init(); diff --git a/src/csharp/Grpc.Core/Internal/AsyncCall.cs b/src/csharp/Grpc.Core/Internal/AsyncCall.cs index 1b00b95bc8..be5d611a53 100644 --- a/src/csharp/Grpc.Core/Internal/AsyncCall.cs +++ b/src/csharp/Grpc.Core/Internal/AsyncCall.cs @@ -344,7 +344,6 @@ namespace Grpc.Core.Internal details.Method, details.Host, Timespec.FromDateTime(details.Options.Deadline.Value)); } - // Make sure that once cancellationToken for this call is cancelled, Cancel() will be called. private void RegisterCancellationCallback() { diff --git a/src/csharp/Grpc.Core/Internal/INativeCall.cs b/src/csharp/Grpc.Core/Internal/INativeCall.cs index ed4257d1f4..cbef599139 100644 --- a/src/csharp/Grpc.Core/Internal/INativeCall.cs +++ b/src/csharp/Grpc.Core/Internal/INativeCall.cs @@ -31,6 +31,7 @@ #endregion using System; + namespace Grpc.Core.Internal { internal delegate void UnaryResponseClientHandler(bool success, ClientSideStatus receivedStatus, byte[] receivedMessage, Metadata responseHeaders); |