Skip to content

Commit

Permalink
change test to use loop
Browse files Browse the repository at this point in the history
  • Loading branch information
Wraith2 committed Mar 9, 2021
1 parent 5c95a4b commit 860ade4
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,11 @@ private static async Task ExecuteWaitForAsync(CancellationToken cancellationToke
using (var connection = new SqlConnection(connectionString))
{
await connection.OpenAsync().ConfigureAwait(false);
using (var command = new SqlCommand($"WAITFOR DELAY '00:00:{delaySeconds:D2}'", connection))
using (var command = new SqlCommand(@"
WHILE 1 = 1
BEGIN
DECLARE @x INT = 1
END", connection))
{
command.CommandTimeout = delaySeconds + 10;
await command.ExecuteNonQueryAsync(cancellationToken).ConfigureAwait(false);
Expand Down

0 comments on commit 860ade4

Please sign in to comment.