From 42e27b6a84717340bd7f72e07c4a2048b7d21b26 Mon Sep 17 00:00:00 2001 From: Krzysztof Nozderko Date: Fri, 1 Mar 2024 18:18:15 +0100 Subject: [PATCH] remove sleeping from expiration timeout tests --- .../IntegrationTests/ConnectionMultiplePoolsIT.cs | 4 +--- .../IntegrationTests/ConnectionSinglePoolCacheIT.cs | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/Snowflake.Data.Tests/IntegrationTests/ConnectionMultiplePoolsIT.cs b/Snowflake.Data.Tests/IntegrationTests/ConnectionMultiplePoolsIT.cs index 2c705ab26..fbc143c59 100644 --- a/Snowflake.Data.Tests/IntegrationTests/ConnectionMultiplePoolsIT.cs +++ b/Snowflake.Data.Tests/IntegrationTests/ConnectionMultiplePoolsIT.cs @@ -1,7 +1,6 @@ using System; using System.Data; using System.Linq; -using System.Threading; using System.Threading.Tasks; using NUnit.Framework; using Snowflake.Data.Client; @@ -306,7 +305,7 @@ public void TestConnectionPoolExpirationWorks() conn1.ConnectionString = ConnectionString; conn1.Open(); conn1.Close(); - SnowflakeDbConnectionPool.SetTimeout(1); + SnowflakeDbConnectionPool.SetTimeout(0); SnowflakeDbConnectionPool.SetMaxPoolSize(2); var conn2 = new SnowflakeDbConnection(); @@ -317,7 +316,6 @@ public void TestConnectionPoolExpirationWorks() var conn3 = new SnowflakeDbConnection(); conn3.ConnectionString = ConnectionString; conn3.Open(); - Thread.Sleep(1010); conn3.Close(); // The pooling timeout should apply to all connections being pooled, diff --git a/Snowflake.Data.Tests/IntegrationTests/ConnectionSinglePoolCacheIT.cs b/Snowflake.Data.Tests/IntegrationTests/ConnectionSinglePoolCacheIT.cs index 8345ae687..fe91f8610 100644 --- a/Snowflake.Data.Tests/IntegrationTests/ConnectionSinglePoolCacheIT.cs +++ b/Snowflake.Data.Tests/IntegrationTests/ConnectionSinglePoolCacheIT.cs @@ -1,7 +1,6 @@ using System; using System.Data; using System.Data.Common; -using System.Threading; using System.Threading.Tasks; using NUnit.Framework; using Snowflake.Data.Client; @@ -269,7 +268,7 @@ public void TestConnectionPoolExpirationWorks() conn1.Open(); conn1.Close(); - SnowflakeDbConnectionPool.SetTimeout(1); + SnowflakeDbConnectionPool.SetTimeout(0); var conn2 = new SnowflakeDbConnection(); conn2.ConnectionString = ConnectionString; @@ -279,7 +278,6 @@ public void TestConnectionPoolExpirationWorks() var conn3 = new SnowflakeDbConnection(); conn3.ConnectionString = ConnectionString; conn3.Open(); - Thread.Sleep(1010); conn3.Close(); // The pooling timeout should apply to all connections being pooled,