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

Linux test failure: Environment_newline_is_funcletized #20439

Closed
ajcvickers opened this issue Mar 27, 2020 · 1 comment · Fixed by #20450
Closed

Linux test failure: Environment_newline_is_funcletized #20439

ajcvickers opened this issue Mar 27, 2020 · 1 comment · Fixed by #20450
Labels
area-test closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-bug
Milestone

Comments

@ajcvickers
Copy link
Member

✘Microsoft.EntityFrameworkCore.Query.NorthwindMiscellaneousQuerySqlServerTest.Environment_newline_is_funcletized(async: False)
Microsoft.Data.SqlClient.SqlException : The concat function requires 2 to 254 arguments.\nMust declare the scalar variable \"@__NewLine_0\".
   at Microsoft.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at Microsoft.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at Microsoft.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at Microsoft.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   at Microsoft.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
   at Microsoft.Data.SqlClient.SqlDataReader.get_MetaData()
   at Microsoft.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)
   at Microsoft.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean isAsync, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
   at Microsoft.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry, String method)
   at Microsoft.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
   at Microsoft.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior)
   at Microsoft.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
   at System.Data.Common.DbCommand.ExecuteReader()
   at Microsoft.EntityFrameworkCore.TestUtilities.RelationalQueryAsserter`1.ExecuteReader(DbCommand command) in /home/ajcvickers/efcore/test/EFCore.Relational.Specification.Tests/TestUtilities/RelationalQueryAsserter.cs:line 69
   at Microsoft.EntityFrameworkCore.TestUtilities.RelationalQueryAsserter`1.ExecuteTheirDbCommand(IQueryable queryable, ValueTuple`4 commandDependencies) in /home/ajcvickers/efcore/test/EFCore.Relational.Specification.Tests/TestUtilities/RelationalQueryAsserter.cs:line 62
   at Microsoft.EntityFrameworkCore.TestUtilities.RelationalQueryAsserter`1.AssertRogueExecution(Int32 expectedCount, IQueryable queryable) in /home/ajcvickers/efcore/test/EFCore.Relational.Specification.Tests/TestUtilities/RelationalQueryAsserter.cs:line 35
   at Microsoft.EntityFrameworkCore.TestUtilities.QueryAsserter`1.AssertQuery[TResult](Func`2 actualQuery, Func`2 expectedQuery, Func`2 elementSorter, Action`2 elementAsserter, Boolean assertOrder, Int32 entryCount, Boolean async, String testMethodName) in /home/ajcvickers/efcore/test/EFCore.Specification.Tests/TestUtilities/QueryAsserter.cs:line 108
   at Microsoft.EntityFrameworkCore.Query.NorthwindMiscellaneousQuerySqlServerTest.Environment_newline_is_funcletized(Boolean async) in /home/ajcvickers/efcore/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindMiscellaneousQuerySqlServerTest.cs:line 2736
--- End of stack trace from previous location where exception was thrown ---```
✘Microsoft.EntityFrameworkCore.Query.NorthwindMiscellaneousQuerySqlServerTest.Environment_newline_is_funcletized(async: True)
Microsoft.Data.SqlClient.SqlException : The concat function requires 2 to 254 arguments.\nMust declare the scalar variable \"@__NewLine_0\".
   at Microsoft.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at Microsoft.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at Microsoft.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at Microsoft.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   at Microsoft.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
   at Microsoft.Data.SqlClient.SqlDataReader.get_MetaData()
   at Microsoft.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)
   at Microsoft.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean isAsync, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
   at Microsoft.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry, String method)
   at Microsoft.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
   at Microsoft.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior)
   at Microsoft.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
   at System.Data.Common.DbCommand.ExecuteReader()
   at Microsoft.EntityFrameworkCore.TestUtilities.RelationalQueryAsserter`1.ExecuteReader(DbCommand command) in /home/ajcvickers/efcore/test/EFCore.Relational.Specification.Tests/TestUtilities/RelationalQueryAsserter.cs:line 69
   at Microsoft.EntityFrameworkCore.TestUtilities.RelationalQueryAsserter`1.ExecuteTheirDbCommand(IQueryable queryable, ValueTuple`4 commandDependencies) in /home/ajcvickers/efcore/test/EFCore.Relational.Specification.Tests/TestUtilities/RelationalQueryAsserter.cs:line 62
   at Microsoft.EntityFrameworkCore.TestUtilities.RelationalQueryAsserter`1.AssertRogueExecution(Int32 expectedCount, IQueryable queryable) in /home/ajcvickers/efcore/test/EFCore.Relational.Specification.Tests/TestUtilities/RelationalQueryAsserter.cs:line 35
   at Microsoft.EntityFrameworkCore.TestUtilities.QueryAsserter`1.AssertQuery[TResult](Func`2 actualQuery, Func`2 expectedQuery, Func`2 elementSorter, Action`2 elementAsserter, Boolean assertOrder, Int32 entryCount, Boolean async, String testMethodName) in /home/ajcvickers/efcore/test/EFCore.Specification.Tests/TestUtilities/QueryAsserter.cs:line 108
   at Microsoft.EntityFrameworkCore.Query.NorthwindMiscellaneousQuerySqlServerTest.Environment_newline_is_funcletized(Boolean async) in /home/ajcvickers/efcore/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindMiscellaneousQuerySqlServerTest.cs:line 2736
--- End of stack trace from previous location where exception was thrown ---
@smitpatel
Copy link
Member

Re-assigning since error happens inside ExecuteTheirDbCommand method which tries to execute output of ToQueryString() and does not seem to be passing any parameters. Why this particular test decided to do that on linux but not windows is still alien to me.

@smitpatel smitpatel assigned ajcvickers and unassigned smitpatel and maumar Mar 27, 2020
ajcvickers added a commit that referenced this issue Mar 28, 2020
Fix two issues building and testing on Linux introduced by #20304 (bad generated SQL for DefaultValue with line breaks /cc @lajones)
* Test literals were using machine line endings
* Replacement mechanism for new lines in literals did not handle a single `\n`

Fixes #20439
Fixes #20438
@ajcvickers ajcvickers added the closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. label Mar 28, 2020
@ajcvickers ajcvickers added this to the 5.0.0 milestone Mar 28, 2020
ajcvickers added a commit that referenced this issue Mar 28, 2020
Fix two issues building and testing on Linux introduced by #20304 (bad generated SQL for DefaultValue with line breaks /cc @lajones)
* Test literals were using machine line endings
* Replacement mechanism for new lines in literals did not handle a single `\n`

Fixes #20439
Fixes #20438
@ajcvickers ajcvickers modified the milestones: 5.0.0, 5.0.0-preview3 Mar 31, 2020
@ajcvickers ajcvickers modified the milestones: 5.0.0-preview3, 5.0.0 Nov 7, 2020
@ajcvickers ajcvickers removed their assignment Sep 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-test closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants