Description
This test intermittently fails; looking at the logs, it looks like a currency issue where more than one thread invokes the synchronous Send method.
2017-05-16 18:14:24,963 [22] DEBUG Couchbase.IO.Services.PooledIOService - System.AggregateException: One or more errors occurred. ---> System.NotSupportedException: The BeginRead method cannot be called when another read operation is pending.
at System.Net.Security._SslStream.ProcessRead(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security._SslStream.BeginRead(Byte[] buffer, Int32 offset, Int32 count, AsyncCallback asyncCallback, Object asyncState)
at System.IO.Stream.<>c.<BeginEndReadAsync>b__43_0(Stream stream, ReadWriteParameters args, AsyncCallback callback, Object state)
at System.Threading.Tasks.TaskFactory`1.FromAsyncTrim[TInstance,TArgs](TInstance thisRef, TArgs args, Func`5 beginMethod, Func`3 endMethod)
at System.IO.Stream.BeginEndReadAsync(Byte[] buffer, Int32 offset, Int32 count)
at System.IO.Stream.ReadAsync(Byte[] buffer, Int32 offset, Int32 count, CancellationToken cancellationToken)
at Couchbase.IO.SslConnection.<SendAsync>d__7.MoveNext() in C:\Users\jmorris\repos\couchbase-net-client\Src\Couchbase\IO\SslConnection.cs:line 201
— End of inner exception stack trace —
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at System.Threading.Tasks.Task.Wait(CancellationToken cancellationToken)
at Couchbase.IO.SslConnection.Send(Byte[] buffer) in C:\Users\jmorris\repos\couchbase-net-client\Src\Couchbase\IO\SslConnection.cs:line 175
at Couchbase.IO.Services.PooledIOService.Execute[T](IOperation`1 operation) in C:\Users\jmorris\repos\couchbase-net-client\Src\Couchbase\IO\Services\PooledIOService.cs:line 169
---> (Inner Exception #0) System.NotSupportedException: The BeginRead method cannot be called when another read operation is pending.
at System.Net.Security._SslStream.ProcessRead(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security._SslStream.BeginRead(Byte[] buffer, Int32 offset, Int32 count, AsyncCallback asyncCallback, Object asyncState)
at System.IO.Stream.<>c.<BeginEndReadAsync>b__43_0(Stream stream, ReadWriteParameters args, AsyncCallback callback, Object state)
at System.Threading.Tasks.TaskFactory`1.FromAsyncTrim[TInstance,TArgs](TInstance thisRef, TArgs args, Func`5 beginMethod, Func`3 endMethod)
at System.IO.Stream.BeginEndReadAsync(Byte[] buffer, Int32 offset, Int32 count)
at System.IO.Stream.ReadAsync(Byte[] buffer, Int32 offset, Int32 count, CancellationToken cancellationToken)
at Couchbase.IO.SslConnection.<SendAsync>d__7.MoveNext() in C:\Users\jmorris\repos\couchbas