From 69d2545750531736f1aa69d747166fa7167a539e Mon Sep 17 00:00:00 2001 From: Krzysztof Nozderko Date: Tue, 19 Dec 2023 17:08:52 +0100 Subject: [PATCH] add assert to check if the pool is empty at the beginning --- .../IntegrationTests/ConnectionMultiplePoolsIT.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Snowflake.Data.Tests/IntegrationTests/ConnectionMultiplePoolsIT.cs b/Snowflake.Data.Tests/IntegrationTests/ConnectionMultiplePoolsIT.cs index ffd97b781..8d52b58ab 100644 --- a/Snowflake.Data.Tests/IntegrationTests/ConnectionMultiplePoolsIT.cs +++ b/Snowflake.Data.Tests/IntegrationTests/ConnectionMultiplePoolsIT.cs @@ -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(); @@ -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)