-
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.
Pool/SNOW-937189 busy sessions in pool (3/4) (#818)
### Description Connection Pool v2: - introduction of a counter of busy sessions created by Pool Manager - pool size counts both: Idle and Busy sessions ### Checklist - [x] Code compiles correctly - [x] Code is formatted according to [Coding Conventions](../CodingConventions.md) - [x] Created tests which fail without the change (if possible) - [x] All tests passing (`dotnet test`) - [x] Extended the README / documentation, if necessary - [x] Provide JIRA issue id (if possible) or GitHub issue id in PR name
- Loading branch information
1 parent
bf7a13e
commit 56f0b81
Showing
12 changed files
with
370 additions
and
103 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
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
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
48 changes: 48 additions & 0 deletions
48
Snowflake.Data.Tests/UnitTests/Session/FixedZeroCounterTest.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,48 @@ | ||
using NUnit.Framework; | ||
using Snowflake.Data.Core.Session; | ||
|
||
namespace Snowflake.Data.Tests.UnitTests.Session | ||
{ | ||
[TestFixture] | ||
public class FixedZeroCounterTest | ||
{ | ||
[Test] | ||
public void TestInitialZero() | ||
{ | ||
// arrange | ||
var counter = new FixedZeroCounter(); | ||
|
||
// act | ||
var count = counter.Count(); | ||
|
||
// assert | ||
Assert.AreEqual(0, count); | ||
} | ||
|
||
[Test] | ||
public void TestZeroAfterIncrease() | ||
{ | ||
// arrange | ||
var counter = new FixedZeroCounter(); | ||
|
||
// act | ||
counter.Increase(); | ||
|
||
// assert | ||
Assert.AreEqual(0, counter.Count()); | ||
} | ||
|
||
[Test] | ||
public void TestZeroAfterDecrease() | ||
{ | ||
// arrange | ||
var counter = new FixedZeroCounter(); | ||
|
||
// act | ||
counter.Decrease(); | ||
|
||
// assert | ||
Assert.AreEqual(0, counter.Count()); | ||
} | ||
} | ||
} |
Oops, something went wrong.