You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
--[@tSQLt:SkipTest]('TODO: tSQLt should handle this, but does not at the moment because of the issue with transactions started within a try-catch block')
2444
2445
CREATEPROCEDURE Run_Methods_Tests.[test produces meaningful error when pre and post transactions counts don't match]
--[@tSQLt:SkipTest]('TODO: need to review handling of unexpected changes to the tSQLt transaction for NoTransaction tests')
2459
+
--[@tSQLt:SkipTest]('TODO: tSQLt should handle this, but does not at the moment because of the issue with transactions started within a try-catch block')
2459
2460
CREATEPROCEDURE Run_Methods_Tests.[test produces meaningful error when pre and post transactions counts don't match in NoTransaction test]
2460
2461
AS
2461
2462
BEGIN
2462
2463
EXECtSQLt.NewTestClass'MyInnerTestsB'
2463
2464
EXEC('
2464
2465
--[@'+'tSQLt:NoTransaction](DEFAULT)
2465
-
CREATE PROCEDURE MyInnerTestsB.[test should execute outside of transaction] AS BEGIN TRAN;SELECT * FROM fn_dblog(NULL,NULL) WHERE [Transaction ID] = (SELECT LL.[Transaction ID] FROM fn_dblog(NULL,NULL) LL JOIN sys.dm_tran_current_transaction AS DTCT ON DTCT.transaction_id = LL.[Xact ID]);
2466
+
CREATE PROCEDURE MyInnerTestsB.[test should execute outside of transaction] AS BEGIN TRAN;
EXECtSQLt.Run'MyInnerTestsB.[test should execute outside of transaction]';
2469
2471
2470
-
BEGINTRY
2471
-
EXECtSQLt.Run'MyInnerTestsB.[test should execute outside of transaction]';
2472
-
ENDTRY
2473
-
BEGINCATCH
2474
-
SELECT*FROM fn_dblog(NULL,NULL) WHERE [Transaction ID] = (SELECT LL.[Transaction ID] FROM fn_dblog(NULL,NULL) LL JOINsys.dm_tran_current_transactionAS DTCT ONDTCT.transaction_id= LL.[Xact ID]);
2475
-
ENDCATCH;
2472
+
-- FOR FUTURE DEBUGGING
2473
+
--BEGIN TRY
2474
+
-- EXEC tSQLt.Run 'MyInnerTestsB.[test should execute outside of transaction]';
2475
+
--END TRY
2476
+
--BEGIN CATCH
2477
+
-- SELECT * FROM fn_dblog(NULL,NULL) WHERE [Transaction ID] = (SELECT LL.[Transaction ID] FROM fn_dblog(NULL,NULL) LL JOIN sys.dm_tran_current_transaction AS DTCT ON DTCT.transaction_id = LL.[Xact ID]);
0 commit comments