-
Notifications
You must be signed in to change notification settings - Fork 140
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SNOW-902611 teardown of pool settings changes in tests
- Loading branch information
1 parent
1616fed
commit 2b09dea
Showing
4 changed files
with
47 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
Snowflake.Data.Tests/IntegrationTests/PoolConfigRestorer.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using Snowflake.Data.Client; | ||
|
||
namespace Snowflake.Data.Tests.IntegrationTests | ||
{ | ||
class PoolConfigRestorer { | ||
private readonly bool _pooling; | ||
private readonly long _timeout; | ||
private readonly int _maxPoolSize; | ||
|
||
public PoolConfigRestorer() | ||
{ | ||
_maxPoolSize = SnowflakeDbConnectionPool.GetMaxPoolSize(); | ||
_timeout = SnowflakeDbConnectionPool.GetTimeout(); | ||
_pooling = SnowflakeDbConnectionPool.GetPooling(); | ||
} | ||
|
||
public void Reset() | ||
{ | ||
SnowflakeDbConnectionPool.SetMaxPoolSize(_maxPoolSize); | ||
SnowflakeDbConnectionPool.SetTimeout(_timeout); | ||
SnowflakeDbConnectionPool.SetPooling(_pooling); | ||
} | ||
} | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters