Skip to content

Commit

Permalink
add assert to check if the pool is empty at the beginning
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-knozderko committed Dec 19, 2023
1 parent ee2bff8 commit 69d2545
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ public void TestWaitForTheIdleConnectionWhenExceedingMaxConnectionsLimit()
{
// arrange
var pool = SnowflakeDbConnectionPool.GetPool(ConnectionString);
Assert.AreEqual(0, pool.GetCurrentPoolSize(), "expecting pool to be empty");
pool.SetMaxPoolSize(2);
pool.SetWaitingTimeout(1000);
var conn1 = OpenedConnection();
Expand Down Expand Up @@ -130,6 +131,7 @@ public void TestWaitInAQueueForAnIdleSession()
{
// arrange
var pool = SnowflakeDbConnectionPool.GetPool(ConnectionString);
Assert.AreEqual(0, pool.GetCurrentPoolSize(), "the pool is expected to be empty");
pool.SetMaxPoolSize(2);
pool.SetWaitingTimeout(3000);
var threads = new ConnectingThreads(ConnectionString)
Expand Down

0 comments on commit 69d2545

Please sign in to comment.