We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4f6aa83 commit 598d450Copy full SHA for 598d450
src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/SqlCommand/SqlCommandCancelTest.cs
@@ -607,7 +607,11 @@ private static async Task ExecuteWaitForAsync(CancellationToken cancellationToke
607
using (var connection = new SqlConnection(connectionString))
608
{
609
await connection.OpenAsync().ConfigureAwait(false);
610
- using (var command = new SqlCommand($"WAITFOR DELAY '00:00:{delaySeconds:D2}'", connection))
+ using (var command = new SqlCommand(@"
611
+WHILE 1 = 1
612
+BEGIN
613
+ DECLARE @x INT = 1
614
+END", connection))
615
616
command.CommandTimeout = delaySeconds + 10;
617
await command.ExecuteNonQueryAsync(cancellationToken).ConfigureAwait(false);
0 commit comments