Skip to content
This repository was archived by the owner on Dec 18, 2018. It is now read-only.
This repository was archived by the owner on Dec 18, 2018. It is now read-only.

Flaky test: WritingToConnectionAfterUnobservedCloseTriggersRequestAbortedToken #2750

@ryanbrandenburg

Description

@ryanbrandenburg

This test fails occasionally with the following error:

Moq.MockException : 
Expected invocation on the mock once, but was 0 times: t => t.ConnectionStop(It.IsAny<String>())
No setups configured.
Performed invocations:
KestrelTrace.IsEnabled(Critical)
KestrelTrace.BeginScope<ConnectionLogScope>([[ConnectionId, 0HLFHOOITD5M5]])
KestrelTrace.ConnectionStart("0HLFHOOITD5M5")
KestrelTrace.ConnectionDisconnect("0HLFHOOITD5M5")
KestrelTrace.ApplicationError("0HLFHOOITD5M5", "0HLFHOOITD5M5:00000001", System.OperationCanceledException: The operation was canceled.
   at System.Threading.CancellationToken.ThrowOperationCanceledException()
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpResponseStream.ValidateState(CancellationToken cancellationToken) in /_/src/Kestrel.Core/Internal/Http/HttpResponseStream.cs:line 168
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpResponseStream.WriteAsync(Byte[] buffer, Int32 offset, Int32 count, CancellationToken cancellationToken) in /_/src/Kestrel.Core/Internal/Http/HttpResponseStream.cs:line 111
   at Microsoft.AspNetCore.Server.Kestrel.FunctionalTests.ResponseTests.<>c__DisplayClass61_0.<<WritingToConnectionAfterUnobservedCloseTriggersRequestAbortedToken>b__6>d.MoveNext() in /_/test/Kestrel.FunctionalTests/ResponseTests.cs:line 2398
--- End of stack trace from previous location where exception was thrown ---
   at Xunit.Assert.RecordExceptionAsync(Func`1 testCode) in C:\Dev\xunit\xunit\src\xunit.assert\Asserts\Record.cs:line 82)
   at Moq.Mock.ThrowVerifyException(MethodCall expected, IEnumerable`1 setups, IEnumerable`1 actualCalls, Expression expression, Times times, Int32 callCount)
   at Moq.Mock.VerifyCalls(Interceptor targetInterceptor, MethodCall expected, Expression expression, Times times)
   at Moq.Mock.Verify[T](Mock`1 mock, Expression`1 expression, Times times, String failMessage)
   at Microsoft.AspNetCore.Server.Kestrel.FunctionalTests.ResponseTests.WritingToConnectionAfterUnobservedCloseTriggersRequestAbortedToken(ListenOptions listenOptions) in /_/test/Kestrel.FunctionalTests/ResponseTests.cs:line 2432
--- End of stack trace from previous location where exception was thrown ---

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions