Skip to content

Commit

Permalink
remove sleeping from expiration timeout tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-knozderko committed Mar 4, 2024
1 parent c0e377c commit 42e27b6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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();
Expand All @@ -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,
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -269,7 +268,7 @@ public void TestConnectionPoolExpirationWorks()

conn1.Open();
conn1.Close();
SnowflakeDbConnectionPool.SetTimeout(1);
SnowflakeDbConnectionPool.SetTimeout(0);

var conn2 = new SnowflakeDbConnection();
conn2.ConnectionString = ConnectionString;
Expand All @@ -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,
Expand Down

0 comments on commit 42e27b6

Please sign in to comment.