Skip to content

Commit ac1060a

Browse files
committed
Fix tests.
1 parent 3fefaf7 commit ac1060a

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

Tests/TransientFaultHandling.Bvt.Tests/Sql/SqlExceptionTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ await retryPolicy.ExecuteAsync(async () =>
1616
{
1717
await using SqlConnection connection = new (TestDatabase.TransientFaultHandlingTestDatabase);
1818
await connection.OpenAsync();
19-
await using SqlCommand? command = connection.CreateCommand();
19+
await using SqlCommand command = connection.CreateCommand();
2020
command.CommandText = $"RAISERROR('{CustomErrorMessage}', 16, 1)";
2121
await command.ExecuteNonQueryAsync();
2222
Assert.Fail();
@@ -46,7 +46,7 @@ public void CanHandleSqlException()
4646
{
4747
using SqlConnection connection = new (TestDatabase.TransientFaultHandlingTestDatabase);
4848
connection.Open();
49-
using SqlCommand? command = connection.CreateCommand();
49+
using SqlCommand command = connection.CreateCommand();
5050
command.CommandText = $"RAISERROR('{CustomErrorMessage}', 16, 1)";
5151
command.ExecuteNonQuery();
5252
Assert.Fail();

Tests/TransientFaultHandling.Tests.Core/RetryFixedIntervalTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ public void FixedIntervalWithoutResultTest()
88
{
99
const int RetryCount = 5;
1010
TimeSpan retryInterval = TimeSpan.FromSeconds(1);
11-
Counter<InvalidOperationException> counter = new(RetryCount);
11+
Counter<InvalidOperationException> counter = new (RetryCount);
1212
int retryFuncCount = 0;
1313
int retryHandlerCount = 0;
1414
Retry.FixedInterval(

Tools/AssemblyInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
#if NETSTANDARD1_6 || NETSTANDARD2_0
77
// The NETSTANDARD1_6 and NETSTANDARD2_0 builds can be used by .NET Framework projects.
8-
// Without this, when TransientFaultHandling.Data.Core is used by .NET Framework projects, it throws System.TypeAccessException when handling SqlException:
8+
// Without this, when TransientFaultHandling.Data.Core is used by .NET Framework projects, it throws System.TypeAccessException while handling SqlException:
99
// Attempt by security transparent method 'Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling.SqlDatabaseTransientErrorDetectionStrategy.IsTransient(System.Exception)' to access security critical type 'Microsoft.Data.SqlClient.SqlException' failed.
1010
// NETSTANDARD1_0 to NETSTANDARD1_5 does not support [SecurityRules]. And NETSTANDARD2_1_OR_GREATER is not supported by .NET Framework.
1111
// https://docs.microsoft.com/en-us/dotnet/standard/net-standard#specification

0 commit comments

Comments
 (0)