65 lines
4.5 KiB
Plaintext
65 lines
4.5 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.
|
|
Failed QueryBreakdown_AggregateCount_ReturnsAggregateResult [57 ms]
|
|
Error Message:
|
|
System.Data.SqlClient.SqlException : The INSERT statement conflicted with the FOREIGN KEY constraint "FK__orders__user_id__269AB60B". 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 233
|
|
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__269AB60B". 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! - Failed: 1, Passed: 17, Skipped: 0, Total: 18, Duration: 1 s - Strata.SqlTools.SqlServer.TestContainers.dll (net8.0)
|