Files
sql-utilities/sqlserver_test_output.txt

173 lines
14 KiB
Plaintext

Test run for C:\Git\sql-utilities\testContainers\Strata.SqlTools.SqlServer.TestContainers\bin\Debug\net8.0\Strata.SqlTools.SqlServer.TestContainers.dll (.NETCoreApp,Version=v8.0)
VSTest version 17.14.1 (x64)
Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
NUnit Adapter 4.6.0.0: Test execution started
Running all tests in C:\Git\sql-utilities\testContainers\Strata.SqlTools.SqlServer.TestContainers\bin\Debug\net8.0\Strata.SqlTools.SqlServer.TestContainers.dll
NUnit3TestExecutor discovered 18 of 18 NUnit test cases using Current Discovery mode, Non-Explicit run
Error executing non-query: The INSERT statement conflicted with the FOREIGN KEY constraint "FK__orders__user_id__25A691D2". The conflict occurred in database "master", table "dbo.users", column 'id'.
The statement has been terminated.
SQL:
INSERT INTO users (name, email, active) VALUES
('Alice Johnson', 'alice@example.com', 1),
('Bob Smith', 'bob@example.com', 1),
('Charlie Brown', 'charlie@example.com', 0),
('Diana Prince', 'diana@example.com', 1);
INSERT INTO orders (user_id, order_total) VALUES
(1, 99.99),
(1, 150.50),
(2, 75.25),
(3, 200.00),
(4, 125.75);
INSERT INTO products (name, price, in_stock) VALUES
('Laptop', 999.99, 1),
('Mouse', 29.99, 1),
('Keyboard', 79.99, 0),
('Monitor', 299.99, 1);
Failed QueryBreakdown_AggregateCount_ReturnsAggregateResult [42 ms]
Error Message:
System.Data.SqlClient.SqlException : The INSERT statement conflicted with the FOREIGN KEY constraint "FK__orders__user_id__25A691D2". The conflict occurred in database "master", table "dbo.users", column 'id'.
The statement has been terminated.
Data:
HelpLink.ProdName: Microsoft SQL Server
HelpLink.ProdVer: 16.00.4236
HelpLink.EvtSrc: MSSQLServer
HelpLink.EvtID: 547
HelpLink.BaseHelpUrl: https://go.microsoft.com/fwlink
HelpLink.LinkId: 20476
Stack Trace:
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at System.Data.SqlClient.SqlCommand.EndExecuteNonQueryInternal(IAsyncResult asyncResult)
at System.Data.SqlClient.SqlCommand.EndExecuteNonQuery(IAsyncResult asyncResult)
at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)
--- End of stack trace from previous location ---
at Strata.SqlTools.Tests.SqlServer.TestContainers.SqlServerTestContainerFixture.ExecuteNonQuery(String sql) in C:\Git\sql-utilities\testContainers\Strata.SqlTools.SqlServer.TestContainers\SqlServerTestContainerFixture.cs:line 222
at Strata.SqlTools.Tests.SqlServer.TestContainers.SqlServerQueryBreakdownIntegrationTests.InsertTestData() in C:\Git\sql-utilities\testContainers\Strata.SqlTools.SqlServer.TestContainers\SqlServerQueryBreakdownIntegrationTests.cs:line 21
at Strata.SqlTools.Tests.SqlServer.TestContainers.SqlServerQueryBreakdownIntegrationTests.Setup() in C:\Git\sql-utilities\testContainers\Strata.SqlTools.SqlServer.TestContainers\SqlServerQueryBreakdownIntegrationTests.cs:line 16
at NUnit.Framework.Internal.TaskAwaitAdapter.GenericAdapter`1.BlockUntilCompleted()
at NUnit.Framework.Internal.MessagePumpStrategy.NoMessagePumpStrategy.WaitForCompletion(AwaitAdapter awaiter)
at NUnit.Framework.Internal.AsyncToSyncAdapter.Await[TResult](Func`1 invoke)
at NUnit.Framework.Internal.AsyncToSyncAdapter.Await(Func`1 invoke)
at NUnit.Framework.Internal.Commands.SetUpTearDownItem.RunSetUpOrTearDownMethod(TestExecutionContext context, IMethodInfo method)
at NUnit.Framework.Internal.Commands.SetUpTearDownItem.RunSetUp(TestExecutionContext context)
at NUnit.Framework.Internal.Commands.BeforeAndAfterTestCommand.<>c__DisplayClass1_0.<Execute>b__0()
at NUnit.Framework.Internal.Commands.DelegatingTestCommand.RunTestMethodInThreadAbortSafeZone(TestExecutionContext context, Action action)
Standard Output Messages:
Error executing non-query: The INSERT statement conflicted with the FOREIGN KEY constraint "FK__orders__user_id__25A691D2". The conflict occurred in database "master", table "dbo.users", column 'id'.
The statement has been terminated.
SQL:
INSERT INTO users (name, email, active) VALUES
('Alice Johnson', 'alice@example.com', 1),
('Bob Smith', 'bob@example.com', 1),
('Charlie Brown', 'charlie@example.com', 0),
('Diana Prince', 'diana@example.com', 1);
INSERT INTO orders (user_id, order_total) VALUES
(1, 99.99),
(1, 150.50),
(2, 75.25),
(3, 200.00),
(4, 125.75);
INSERT INTO products (name, price, in_stock) VALUES
('Laptop', 999.99, 1),
('Mouse', 29.99, 1),
('Keyboard', 79.99, 0),
('Monitor', 299.99, 1);
Passed QueryBreakdown_AggregateSum_ReturnsSumResult [44 ms]
Passed QueryBreakdown_ComplexMultiJoinQuery_ReturnsCorrectResults [49 ms]
Passed QueryBreakdown_GroupByWithHaving_FiltersAggregateResults [38 ms]
Passed QueryBreakdown_HandlesBitDataTypes [34 ms]
Passed QueryBreakdown_HandlesDateTimeDataTypes [35 ms]
Passed QueryBreakdown_HandlesDecimalDataTypes [42 ms]
Passed QueryBreakdown_ParseAndExecuteRealSql_ReturnsResults [50 ms]
Passed QueryBreakdown_SelectActiveUsers_ReturnsActiveOnly [38 ms]
Passed QueryBreakdown_SelectAllUsers_ReturnsRows [37 ms]
Failed QueryBreakdown_SelectWithJoin_ReturnsJoinedData [37 ms]
Error Message:
System.NullReferenceException : Object reference not set to an instance of an object.
Stack Trace:
at Strata.SqlTools.Statements.SqlServer.StatementParser.ExtractSqlComments(String sql, List`1& comments) in C:\Git\sql-utilities\src\Strata.SqlTools.SqlServer\Statements\StatementParser.cs:line 151
at Strata.SqlTools.Breakdowns.SqlServer.QueryBreakdown..ctor(String selectClause, String fromClause, String whereClause) in C:\Git\sql-utilities\src\Strata.SqlTools.SqlServer\Breakdowns\QueryBreakdown.cs:line 64
at Strata.SqlTools.Breakdowns.SqlServer.QueryBreakdown..ctor(String selectClause, String fromClause, String whereClause, String orderByClause) in C:\Git\sql-utilities\src\Strata.SqlTools.SqlServer\Breakdowns\QueryBreakdown.cs:line 77
at Strata.SqlTools.Tests.SqlServer.TestContainers.SqlServerQueryBreakdownIntegrationTests.QueryBreakdown_SelectWithJoin_ReturnsJoinedData() in C:\Git\sql-utilities\testContainers\Strata.SqlTools.SqlServer.TestContainers\SqlServerQueryBreakdownIntegrationTests.cs:line 97
at NUnit.Framework.Internal.TaskAwaitAdapter.GenericAdapter`1.GetResult()
at NUnit.Framework.Internal.AsyncToSyncAdapter.Await[TResult](Func`1 invoke)
at NUnit.Framework.Internal.AsyncToSyncAdapter.Await(Func`1 invoke)
at NUnit.Framework.Internal.Commands.TestMethodCommand.RunTestMethod(TestExecutionContext context)
at NUnit.Framework.Internal.Commands.TestMethodCommand.Execute(TestExecutionContext context)
at NUnit.Framework.Internal.Commands.BeforeAndAfterTestCommand.<>c__DisplayClass1_0.<Execute>b__0()
at NUnit.Framework.Internal.Commands.DelegatingTestCommand.RunTestMethodInThreadAbortSafeZone(TestExecutionContext context, Action action)
Failed QueryBreakdown_SelectWithOffsetFetch_SkipsAndLimitsResults [34 ms]
Error Message:
System.NullReferenceException : Object reference not set to an instance of an object.
Stack Trace:
at Strata.SqlTools.Statements.SqlServer.StatementParser.ExtractSqlComments(String sql, List`1& comments) in C:\Git\sql-utilities\src\Strata.SqlTools.SqlServer\Statements\StatementParser.cs:line 151
at Strata.SqlTools.Breakdowns.SqlServer.QueryBreakdown..ctor(String selectClause, String fromClause, String whereClause) in C:\Git\sql-utilities\src\Strata.SqlTools.SqlServer\Breakdowns\QueryBreakdown.cs:line 64
at Strata.SqlTools.Breakdowns.SqlServer.QueryBreakdown..ctor(String selectClause, String fromClause, String whereClause, String orderByClause) in C:\Git\sql-utilities\src\Strata.SqlTools.SqlServer\Breakdowns\QueryBreakdown.cs:line 77
at Strata.SqlTools.Tests.SqlServer.TestContainers.SqlServerQueryBreakdownIntegrationTests.QueryBreakdown_SelectWithOffsetFetch_SkipsAndLimitsResults() in C:\Git\sql-utilities\testContainers\Strata.SqlTools.SqlServer.TestContainers\SqlServerQueryBreakdownIntegrationTests.cs:line 231
at NUnit.Framework.Internal.TaskAwaitAdapter.GenericAdapter`1.GetResult()
at NUnit.Framework.Internal.AsyncToSyncAdapter.Await[TResult](Func`1 invoke)
at NUnit.Framework.Internal.AsyncToSyncAdapter.Await(Func`1 invoke)
at NUnit.Framework.Internal.Commands.TestMethodCommand.RunTestMethod(TestExecutionContext context)
at NUnit.Framework.Internal.Commands.TestMethodCommand.Execute(TestExecutionContext context)
at NUnit.Framework.Internal.Commands.BeforeAndAfterTestCommand.<>c__DisplayClass1_0.<Execute>b__0()
at NUnit.Framework.Internal.Commands.DelegatingTestCommand.RunTestMethodInThreadAbortSafeZone(TestExecutionContext context, Action action)
Failed QueryBreakdown_SelectWithOrderBy_ReturnsOrderedResults [31 ms]
Error Message:
System.NullReferenceException : Object reference not set to an instance of an object.
Stack Trace:
at Strata.SqlTools.Statements.SqlServer.StatementParser.ExtractSqlComments(String sql, List`1& comments) in C:\Git\sql-utilities\src\Strata.SqlTools.SqlServer\Statements\StatementParser.cs:line 151
at Strata.SqlTools.Breakdowns.SqlServer.QueryBreakdown..ctor(String selectClause, String fromClause, String whereClause) in C:\Git\sql-utilities\src\Strata.SqlTools.SqlServer\Breakdowns\QueryBreakdown.cs:line 64
at Strata.SqlTools.Breakdowns.SqlServer.QueryBreakdown..ctor(String selectClause, String fromClause, String whereClause, String orderByClause) in C:\Git\sql-utilities\src\Strata.SqlTools.SqlServer\Breakdowns\QueryBreakdown.cs:line 77
at Strata.SqlTools.Tests.SqlServer.TestContainers.SqlServerQueryBreakdownIntegrationTests.QueryBreakdown_SelectWithOrderBy_ReturnsOrderedResults() in C:\Git\sql-utilities\testContainers\Strata.SqlTools.SqlServer.TestContainers\SqlServerQueryBreakdownIntegrationTests.cs:line 78
at NUnit.Framework.Internal.TaskAwaitAdapter.GenericAdapter`1.GetResult()
at NUnit.Framework.Internal.AsyncToSyncAdapter.Await[TResult](Func`1 invoke)
at NUnit.Framework.Internal.AsyncToSyncAdapter.Await(Func`1 invoke)
at NUnit.Framework.Internal.Commands.TestMethodCommand.RunTestMethod(TestExecutionContext context)
at NUnit.Framework.Internal.Commands.TestMethodCommand.Execute(TestExecutionContext context)
at NUnit.Framework.Internal.Commands.BeforeAndAfterTestCommand.<>c__DisplayClass1_0.<Execute>b__0()
at NUnit.Framework.Internal.Commands.DelegatingTestCommand.RunTestMethodInThreadAbortSafeZone(TestExecutionContext context, Action action)
Passed QueryBreakdown_SelectWithParameterizedQuery_ReturnsFilteredResults [32 ms]
Passed QueryBreakdown_SelectWithStringParameter_ReturnsFilteredResults [38 ms]
Failed QueryBreakdown_SelectWithTop_ReturnsLimitedResults [47 ms]
Error Message:
System.NullReferenceException : Object reference not set to an instance of an object.
Stack Trace:
at Strata.SqlTools.Statements.SqlServer.StatementParser.ExtractSqlComments(String sql, List`1& comments) in C:\Git\sql-utilities\src\Strata.SqlTools.SqlServer\Statements\StatementParser.cs:line 151
at Strata.SqlTools.Breakdowns.SqlServer.QueryBreakdown..ctor(String selectClause, String fromClause, String whereClause) in C:\Git\sql-utilities\src\Strata.SqlTools.SqlServer\Breakdowns\QueryBreakdown.cs:line 64
at Strata.SqlTools.Breakdowns.SqlServer.QueryBreakdown..ctor(String selectClause, String fromClause, String whereClause, String orderByClause) in C:\Git\sql-utilities\src\Strata.SqlTools.SqlServer\Breakdowns\QueryBreakdown.cs:line 77
at Strata.SqlTools.Tests.SqlServer.TestContainers.SqlServerQueryBreakdownIntegrationTests.QueryBreakdown_SelectWithTop_ReturnsLimitedResults() in C:\Git\sql-utilities\testContainers\Strata.SqlTools.SqlServer.TestContainers\SqlServerQueryBreakdownIntegrationTests.cs:line 217
at NUnit.Framework.Internal.TaskAwaitAdapter.GenericAdapter`1.GetResult()
at NUnit.Framework.Internal.AsyncToSyncAdapter.Await[TResult](Func`1 invoke)
at NUnit.Framework.Internal.AsyncToSyncAdapter.Await(Func`1 invoke)
at NUnit.Framework.Internal.Commands.TestMethodCommand.RunTestMethod(TestExecutionContext context)
at NUnit.Framework.Internal.Commands.TestMethodCommand.Execute(TestExecutionContext context)
at NUnit.Framework.Internal.Commands.BeforeAndAfterTestCommand.<>c__DisplayClass1_0.<Execute>b__0()
at NUnit.Framework.Internal.Commands.DelegatingTestCommand.RunTestMethodInThreadAbortSafeZone(TestExecutionContext context, Action action)
Passed QueryBreakdown_SquareBracketIdentifiers_PreservesIdentifiers [38 ms]
Passed QueryBreakdown_WithCommonTableExpression_ExecutesSuccessfully [33 ms]
NUnit Adapter 4.6.0.0: Test execution complete
Test Run Failed.
Total tests: 18
Passed: 13
Failed: 5
Total time: 31.9267 Seconds