aspnet / MusicStore

[Archived] MusicStore test application that uses ASP.NET/EF Core. Project moved to https://github.com/aspnet/AspNetCore
1.3k stars 878 forks source link

Prevent functional tests from executing concurrently. #625

Closed Tratcher closed 8 years ago

Tratcher commented 8 years ago

@muratg @pranavkm @BrennanConroy The test instability appears to be caused by concurrency conflicts. This PR uses is the same restriction we apply to functional tests in IISIntegration and ServerTests.

JunTaoLuo commented 8 years ago

Doesn't the AssemblyInfo.cs file usually live inside a Properties directory? Otherwise looks good to me.

davidfowl commented 8 years ago

What conflicts?

pranavkm commented 8 years ago

:shipit:

davidfowl commented 8 years ago

Before merging what are the concurrency issues? What did the tests do that cause issues?

Tratcher commented 8 years ago

Unexpected connection closures in the WebListener tests. These will be suppressed by WebListener in the future.

| Information: fail: Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware[0]
| Information:       An unhandled exception has occurred while executing the request
| Information: System.ObjectDisposedException: Cannot access a disposed object.
| Information: Object name: 'Microsoft.Net.Http.Server.ResponseStream'.
| Information:    at Microsoft.Net.Http.Server.ResponseStream.CheckDisposed()
| Information:    at Microsoft.Net.Http.Server.ResponseStream.Write(Byte[] buffer, Int32 offset, Int32 count)
| Information:    at Microsoft.AspNetCore.WebUtilities.HttpResponseStreamWriter.FlushInternal(Boolean flushEncoder)
| Information:    at Microsoft.AspNetCore.WebUtilities.HttpResponseStreamWriter.Dispose(Boolean disposing)
| Information:    at System.IO.TextWriter.Dispose()
| Information:    at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.<ExecuteAsync>d__17.MoveNext()

SQL errors:

        | Information: ---> (Inner Exception #0) System.AggregateException: One or more errors occurred. ---> System.
AggregateException: One or more errors occurred. ---> System.AggregateException: One or more errors occurred. ---> Sy
stem.Data.SqlClient.SqlException: A transport-level error has occurred when receiving results from the server. (provi
der: Session Provider, error: 19 - Physical connection is not usable)
        | Information:    at System.Data.SqlClient.SqlCommand.<>c.<ExecuteDbDataReaderAsync>b__167_0(Task`1 result)
        | Information:    at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.InnerInvoke()
        | Information:    at System.Threading.Tasks.Task.Execute()
        | Information: --- End of stack trace from previous location where exception was thrown ---
        | Information:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
        | Information:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
 task)
        | Information:    at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.<ExecuteAsync>d__20.Mov
eNext()
        | Information: --- End of stack trace from previous location where exception was thrown ---
        | Information:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
        | Information:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
 task)
        | Information:    at Microsoft.EntityFrameworkCore.Query.Internal.AsyncQueryingEnumerable.AsyncEnumerator.<Mo
veNext>d__8.MoveNext()
        | Information:    --- End of inner exception stack trace ---
        | Information:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
        | Information:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
 task)
        | Information:    at System.Linq.AsyncEnumerableExtensions.AsyncSelectEnumerable`2.AsyncSelectEnumerator.<Mov
eNext>d__3.MoveNext()
        | Information:    --- End of inner exception stack trace ---
        | Information:    --- End of inner exception stack trace ---
        | Information:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
        | Information:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
 task)
        | Information:    at Microsoft.EntityFrameworkCore.Query.Internal.AsyncLinqOperatorProvider.ExceptionIntercep
tor`1.EnumeratorExceptionInterceptor.<MoveNext>d__5.MoveNext()