Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flaky Test: AsyncQueryTestBase.Mixed_sync_async_query #6248

Closed
anpete opened this issue Aug 4, 2016 · 4 comments
Closed

Flaky Test: AsyncQueryTestBase.Mixed_sync_async_query #6248

anpete opened this issue Aug 4, 2016 · 4 comments

Comments

@anpete
Copy link
Contributor

anpete commented Aug 4, 2016

Stacktraces: 
(new) Test collection for Microsoft.EntityFrameworkCore.SqlServer.FunctionalTests.AsyncQuerySqlServerTest (1): Microsoft.EntityFrameworkCore.SqlServer.FunctionalTests.AsyncQuerySqlServerTest.Mixed_sync_async_query 
System.InvalidOperationException : There is already an open DataReader associated with this Command which must be closed first.
   at System.Data.SqlClient.SqlInternalConnectionTds.ValidateConnectionForExecute(SqlCommand command)
   at System.Data.SqlClient.SqlCommand.ValidateCommand(Boolean async, String method)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior)
   at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.Execute(IRelationalConnection connection, String executeMethod, IReadOnlyDictionary`2 parameterValues, Boolean openConnection, Boolean closeConnection) in C:\BuildAgent\work\16b2695b987e66d0\src\Microsoft.EntityFrameworkCore.Relational\Storage\Internal\RelationalCommand.cs:line 275
   at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.ExecuteReader(IRelationalConnection connection, IReadOnlyDictionary`2 parameterValues, Boolean manageConnection) in C:\BuildAgent\work\16b2695b987e66d0\src\Microsoft.EntityFrameworkCore.Relational\Storage\Internal\RelationalCommand.cs:line 140
   at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable.Enumerator.MoveNext() in C:\BuildAgent\work\16b2695b987e66d0\src\Microsoft.EntityFrameworkCore.Relational\Query\Internal\QueryingEnumerable.cs:line 81
   at Microsoft.EntityFrameworkCore.Query.QueryMethodProvider.<_ShapedQuery>d__3`1.MoveNext() in C:\BuildAgent\work\16b2695b987e66d0\src\Microsoft.EntityFrameworkCore.Relational\Query\QueryMethodProvider.cs:line 43
   at System.Linq.Lookup`2.CreateForJoin(IEnumerable`1 source, Func`2 keySelector, IEqualityComparer`1 comparer)
   at System.Linq.Enumerable.<GroupJoinIterator>d__71`4.MoveNext()
   at System.Linq.Enumerable.<SelectManyIterator>d__163`3.MoveNext()
   at System.Linq.Enumerable.<GroupJoinIterator>d__71`4.MoveNext()
   at System.Linq.Enumerable.SelectEnumerableIterator`2.MoveNext()
   at Microsoft.EntityFrameworkCore.Query.Internal.LinqOperatorProvider.<_TrackEntities>d__15`2.MoveNext() in C:\BuildAgent\work\16b2695b987e66d0\src\Microsoft.EntityFrameworkCore\Query\Internal\LinqOperatorProvider.cs:line 170
   at Microsoft.EntityFrameworkCore.Query.Internal.LinqOperatorProvider.ExceptionInterceptor`1.EnumeratorExceptionInterceptor.MoveNext() in C:\BuildAgent\work\16b2695b987e66d0\src\Microsoft.EntityFrameworkCore\Query\Internal\LinqOperatorProvider.cs:line 145
   at System.Linq.Enumerable.<SelectManyIterator>d__157`2.MoveNext()
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
anpete added a commit that referenced this issue Aug 4, 2016
anpete added a commit that referenced this issue Aug 5, 2016
@anpete anpete closed this as completed in f04f06b Aug 5, 2016
@maumar
Copy link
Contributor

maumar commented Aug 5, 2016

This failed on my box after applying the latest fix to it, reopening for further investigation.

@maumar maumar reopened this Aug 5, 2016
@divega divega added this to the 1.1.0 milestone Aug 8, 2016
@maumar maumar modified the milestones: 1.1.0, 1.1.0-preview1 Oct 5, 2016
@maumar maumar assigned smitpatel and unassigned anpete Oct 5, 2016
@smitpatel
Copy link
Contributor

smitpatel commented Oct 14, 2016

Error is different now. It happens during parameter injection while running the test in loop.

Test 'Microsoft.EntityFrameworkCore.SqlServer.FunctionalTests.AsyncQuerySqlServerTest.Mixed_sync_async_query' failed: System.ArgumentException : An item with the same key has already been added.
    at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
    at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
    at System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value)
    Query\QueryContext.cs(100,0): at Microsoft.EntityFrameworkCore.Query.QueryContext.AddParameter(String name, Object value)
    Query\AsyncQueryMethodProvider.cs(867,0): at Microsoft.EntityFrameworkCore.Query.AsyncQueryMethodProvider.ParameterInjector`1.InjectParametersEnumerator..ctor(ParameterInjector`1 parameterInjector)
    Query\AsyncQueryMethodProvider.cs(853,0): at Microsoft.EntityFrameworkCore.Query.AsyncQueryMethodProvider.ParameterInjector`1.System.Collections.Generic.IAsyncEnumerable<TElement>.GetEnumerator()
    at System.Linq.AsyncEnumerable.<ToEnumerable_>d__133`1.MoveNext()
    at System.Linq.Enumerable.<GroupJoinIterator>d__40`4.MoveNext()
    at System.Linq.Enumerable.<SelectManyIterator>d__22`3.MoveNext()
    at System.Linq.Enumerable.<GroupJoinIterator>d__40`4.MoveNext()
    at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
    Query\Internal\LinqOperatorProvider.cs(170,0): at Microsoft.EntityFrameworkCore.Query.Internal.LinqOperatorProvider.<_TrackEntities>d__15`2.MoveNext()
    Query\Internal\LinqOperatorProvider.cs(145,0): at Microsoft.EntityFrameworkCore.Query.Internal.LinqOperatorProvider.ExceptionInterceptor`1.EnumeratorExceptionInterceptor.MoveNext()
    at System.Linq.Enumerable.<SelectManyIterator>d__16`2.MoveNext()
    at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
    at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
    AsyncQueryTestBase.cs(82,0): at Microsoft.EntityFrameworkCore.Specification.Tests.AsyncQueryTestBase`1.<Mixed_sync_async_query>d__1.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    --- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    --- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

0 passed, 1 failed, 0 skipped, took 2.50 seconds (xUnit.net 2.2.0 build 3402).

@rowanmiller rowanmiller modified the milestones: 1.1.0, 1.2.0 Oct 17, 2016
@BrennanConroy
Copy link
Member

AsyncQuerySqlServerTest.Except_nested has started failing on the CI with the

System.InvalidOperationException : There is already an open DataReader associated with this Command which must be closed first.

exception

@smitpatel
Copy link
Contributor

Closing this in favour of #7160

@divega divega removed this from the 2.0.0-preview1 milestone May 8, 2017
@smitpatel smitpatel removed their assignment Jan 12, 2022
@ajcvickers ajcvickers reopened this Oct 16, 2022
@ajcvickers ajcvickers closed this as not planned Won't fix, can't repro, duplicate, stale Oct 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants