Skip to content

Commit 04bce8e

Browse files
MichelZbenrr101
authored andcommitted
Use Close instead of Dispose, as Dispose swallows the exception
1 parent 801d2f3 commit 04bce8e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/DataStreamTest/DataStreamTest.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ public static void RunAllTestsForSingleServer_NP()
3131
}
3232
}
3333

34-
[ActiveIssue("5540")]
3534
[ConditionalFact(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringsSetup))]
3635
public static void RunAllTestsForSingleServer_TCP()
3736
{
@@ -2074,7 +2073,7 @@ private static void NonFatalTimeoutDuringRead(string connectionString)
20742073

20752074
// Close will now observe the stored timeout error
20762075
string errorMessage = SystemDataResourceManager.Instance.SQL_Timeout_Execution;
2077-
DataTestUtility.AssertThrowsWrapper<SqlException>(reader.Dispose, errorMessage);
2076+
DataTestUtility.AssertThrowsWrapper<SqlException>(reader.Close, errorMessage);
20782077
}
20792078
}
20802079
}

0 commit comments

Comments
 (0)