Skip to content

Commit

Permalink
fix TestDecreaseResources
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-knozderko committed Jan 2, 2024
1 parent f5c1c23 commit 1c3536d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down
2 changes: 1 addition & 1 deletion Snowflake.Data/Core/Session/SessionPool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 1c3536d

Please sign in to comment.