- Notifications
You must be signed in to change notification settings - Fork311
Tests | Fix SqlBatch Test Deadlocks#3025
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Add parameter to sp_help
codecovbot commentedNov 20, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@## main #3025 +/- ##==========================================+ Coverage 72.68% 72.78% +0.09%========================================== Files 285 332 +47 Lines 59155 83162 +24007 ==========================================+ Hits 42998 60530 +17532- Misses 16157 22632 +6475
Flags with carried forward coverage won't be shown.Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
a78b086
intodotnet:mainUh oh!
There was an error while loading.Please reload this page.
AI Blurp
This pull request includes changes to the
BatchTests.cs
file to add retry logic for SQL commands and to enhance theSqlBatchCommand
functionality. The most important changes are as follows:Enhancements to SQL retry logic:
SqlRetryLogicOption
andSqlRetryLogicBaseProvider
to handle transient errors like deadlocks by retrying the operation up to three times with a delay of 100 milliseconds.Improvements to
SqlBatchCommand
:StoredProcedureBatchSupported
andMixedBatchSupported
methods to include parameters inSqlBatchCommand
for executing stored procedures, specifically adding a parameter for thesp_help
stored procedure.Additional imports:
System.Collections.Generic
import to support the use ofList<SqlParameter>
in the updated methods.Description
I regularly see deadlocks for the tests that use
sp_help
.I'll try to mitigate this in 2 different ways:
@objname
that does less work so it's less likely to get a deadlockIt can probably also be solved by just using another stored procedure that's not prone to deadlocks, but I chose this way as the easiest path
Example test failure:
https://sqlclientdrivers.visualstudio.com/public/_build/results?buildId=101959&view=logs&j=700ebecb-e440-5400-66bb-488206e790af&t=d8ae6a68-b967-5b1e-ef3d-1b53d82075ee&l=826