File tree Expand file tree Collapse file tree
src/Microsoft.Data.SqlClient/tests/UnitTests/SimulatedServerTests Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -57,8 +57,12 @@ steps:
5757 - ${{ if ne(parameters.architecture, 'arm64') }} :
5858
5959 # Install the SDK listed in the global.json file.
60+ #
61+ # retryCountOnTaskFailure is set because UseDotNet@2 fails intermittently
62+ # in CI due to transient network/CDN issues when downloading the SDK.
6063 - task : UseDotNet@2
6164 displayName : Install .NET SDK (global.json)
65+ retryCountOnTaskFailure : 3
6266 inputs :
6367 installationPath : ${{ parameters.installDir }}
6468 packageType : sdk
7175 - ${{ each version in parameters.runtimes }} :
7276 - task : UseDotNet@2
7377 displayName : Install .NET ${{ version }} Runtime
78+ retryCountOnTaskFailure : 3
7479 inputs :
7580 installationPath : ${{ parameters.installDir }}
7681 packageType : runtime
@@ -83,8 +88,13 @@ steps:
8388 - ${{ else }} :
8489
8590 # Use the install script for ARM64.
91+ #
92+ # retryCountOnTaskFailure provides an outer retry around the script's
93+ # internal retry loop, in case the script download itself or the entire
94+ # step fails due to transient issues.
8695 - task : PowerShell@2
8796 displayName : Install .NET SDK and Runtimes for ARM64
97+ retryCountOnTaskFailure : 3
8898 inputs :
8999 targetType : filePath
90100 pwsh : true
Original file line number Diff line number Diff line change @@ -389,6 +389,7 @@ public void TransientFault_ShouldConnectToPrimary(uint errorCode)
389389 [ InlineData ( 40613 ) ]
390390 [ InlineData ( 42108 ) ]
391391 [ InlineData ( 42109 ) ]
392+ [ Trait ( "Category" , "flaky" ) ]
392393 public void TransientFault_RetryDisabled_ShouldFail ( uint errorCode )
393394 {
394395 // Arrange
@@ -484,6 +485,7 @@ public void TransientFault_WithUserProvidedPartner_ShouldConnectToPrimary(uint e
484485 [ InlineData ( 40613 ) ]
485486 [ InlineData ( 42108 ) ]
486487 [ InlineData ( 42109 ) ]
488+ [ Trait ( "Category" , "flaky" ) ]
487489 public void TransientFault_WithUserProvidedPartner_RetryDisabled_ShouldFail ( uint errorCode )
488490 {
489491 // Arrange
Original file line number Diff line number Diff line change @@ -159,6 +159,7 @@ public void NetworkDelayAtRoutedLocation_RetryDisabled_ShouldSucceed()
159159 }
160160
161161 [ Fact ]
162+ [ Trait ( "Category" , "flaky" ) ]
162163 public void NetworkTimeoutAtRoutedLocation_RetryDisabled_ShouldFail ( )
163164 {
164165 // Arrange
You can’t perform that action at this time.
0 commit comments