diff --git a/Snowflake.Data.Tests/UnitTests/Session/SemaphoreBasedQueueTest.cs b/Snowflake.Data.Tests/UnitTests/Session/SemaphoreBasedQueueTest.cs index 9fdd2143c..f5f21f46e 100644 --- a/Snowflake.Data.Tests/UnitTests/Session/SemaphoreBasedQueueTest.cs +++ b/Snowflake.Data.Tests/UnitTests/Session/SemaphoreBasedQueueTest.cs @@ -132,7 +132,7 @@ public void TestDecreaseResources() // assert Assert.IsFalse(result); - Assert.GreaterOrEqual(watch.ElapsedMilliseconds, 50); + Assert.GreaterOrEqual(watch.ElapsedMilliseconds, 45); // sometimes Wait takes a bit smaller amount of time than it should. Thus we expect it to be greater than 45, not just 50. Assert.LessOrEqual(watch.ElapsedMilliseconds, 500); } } diff --git a/Snowflake.Data/Core/Session/SessionPool.cs b/Snowflake.Data/Core/Session/SessionPool.cs index 33ab68339..a553aefce 100644 --- a/Snowflake.Data/Core/Session/SessionPool.cs +++ b/Snowflake.Data/Core/Session/SessionPool.cs @@ -186,7 +186,7 @@ private SFSession WaitForSession(string connStr) var successful = _waitingQueue.Wait((int) timeoutLeft, CancellationToken.None); if (successful) { - s_logger.Warn($"SessionPool::WaitForSession - woken with a session granted for: {debugApplicationName}"); + s_logger.Warn($"SessionPool::WaitForSession - woken with a session granted for: {debugApplicationName} at: {DateTimeOffset.UtcNow.ToUnixTimeMilliseconds()}"); lock (_sessionPoolLock) { var session = ExtractIdleSession(connStr);