diff --git a/Snowflake.Data.Tests/IntegrationTests/SFDbCommandIT.cs b/Snowflake.Data.Tests/IntegrationTests/SFDbCommandIT.cs index 14d9bbe61..0f6609734 100755 --- a/Snowflake.Data.Tests/IntegrationTests/SFDbCommandIT.cs +++ b/Snowflake.Data.Tests/IntegrationTests/SFDbCommandIT.cs @@ -317,13 +317,14 @@ public async Task TestFailedAsyncExecQueryThrowsErrorAsync() using (SnowflakeDbCommand cmd = (SnowflakeDbCommand)conn.CreateCommand()) { // Arrange + var statusMaxRetryCount = 5; var statusRetryCount = 0; cmd.CommandText = $"SELECT * FROM FAKE_TABLE;"; // Act var queryId = await cmd.ExecuteAsyncInAsyncMode(CancellationToken.None).ConfigureAwait(false); var queryStatus = await cmd.GetQueryStatusAsync(queryId, CancellationToken.None).ConfigureAwait(false); - while (statusRetryCount < 5 && QueryStatuses.IsStillRunning(queryStatus)) + while (statusRetryCount < statusMaxRetryCount && QueryStatuses.IsStillRunning(queryStatus)) { Thread.Sleep(1000); queryStatus = await cmd.GetQueryStatusAsync(queryId, CancellationToken.None).ConfigureAwait(false); @@ -1410,12 +1411,13 @@ public void TestFailedAsyncExecQueryThrowsError() using (SnowflakeDbCommand cmd = (SnowflakeDbCommand)conn.CreateCommand()) { // Arrange + var statusMaxRetryCount = 5; var statusRetryCount = 0; cmd.CommandText = $"SELECT * FROM FAKE_TABLE;"; // Act queryId = cmd.ExecuteInAsyncMode(); - while (statusRetryCount < 5 && QueryStatuses.IsStillRunning(cmd.GetQueryStatus(queryId))) + while (statusRetryCount < statusMaxRetryCount && QueryStatuses.IsStillRunning(cmd.GetQueryStatus(queryId))) { Thread.Sleep(1000); statusRetryCount++;