Skip to content

Commit

Permalink
Test | Improve MaxPoolWaitForConnectionTest waiting time (#1465)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaur-Parminder authored Jan 14, 2022
1 parent d74556b commit fc2ea58
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,11 @@ public static void MaxPoolWaitForConnectionTest(string connectionString)
ManualResetEventSlim taskAllowedToSpeak = new ManualResetEventSlim(false);

Task waitTask = Task.Factory.StartNew(() => MaxPoolWaitForConnectionTask(newConnectionString, internalConnection, connectionPool, taskAllowedToSpeak));
Thread.Sleep(200);
int count = 5;
while (waitTask.Status == TaskStatus.WaitingToRun && count-- > 0)
{
Thread.Sleep(200);
}
Assert.Equal(TaskStatus.Running, waitTask.Status);

connection1.Close();
Expand Down

0 comments on commit fc2ea58

Please sign in to comment.