Skip to content

Linux test failure: Environment_newline_is_funcletized #20439

Closed

Description

@ajcvickers
✘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 ---

Activity

  1. smitpatel commented on Mar 27, 2020

    @smitpatel
    Contributor

    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.

  2. added a commit that references this issue on Mar 28, 2020
    6436169
  3. added this to the 5.0.0 milestone on Mar 28, 2020
  4. added a commit that references this issue on Mar 28, 2020
    01beb88
  5. modified the milestones: 5.0.0, on Mar 31, 2020
  6. modified the milestones: , 5.0.0 on Nov 7, 2020
  7. removed their assignment
    on Sep 1, 2024
  8. added theissue type on Jun 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions