Skip to content

Commit

Permalink
SNOW-937188 fixed tests with default timeouts + review fix about none…
Browse files Browse the repository at this point in the history
…mpty values in AuthFactory
  • Loading branch information
sfc-gh-mhofman committed May 13, 2024
1 parent bcce8ef commit 280e00b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Snowflake.Data.Tests/IntegrationTests/SFConnectionIT.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1717,7 +1717,7 @@ public void TestEscapeChar()
conn.Open();
Assert.AreEqual(ConnectionState.Open, conn.State);

Assert.AreEqual(SFSessionHttpClientProperties.DefaultRetryTimeout, conn.ConnectionTimeout);
Assert.AreEqual(SFSessionHttpClientProperties.DefaultRetryTimeout.TotalSeconds, conn.ConnectionTimeout);
// Data source is empty string for now
Assert.AreEqual("", ((SnowflakeDbConnection)conn).DataSource);

Expand All @@ -1743,7 +1743,7 @@ public void TestEscapeChar1()
conn.Open();
Assert.AreEqual(ConnectionState.Open, conn.State);

Assert.AreEqual(SFSessionHttpClientProperties.DefaultRetryTimeout, conn.ConnectionTimeout);
Assert.AreEqual(SFSessionHttpClientProperties.DefaultRetryTimeout.TotalSeconds, conn.ConnectionTimeout);
// Data source is empty string for now
Assert.AreEqual("", ((SnowflakeDbConnection)conn).DataSource);

Expand Down
2 changes: 1 addition & 1 deletion Snowflake.Data/Core/Authenticator/IAuthenticator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ internal static IAuthenticator GetAuthenticator(SFSession session)
{
// Get private key path or private key from connection settings
if ((!session.properties.TryGetValue(SFSessionProperty.PRIVATE_KEY_FILE, out var pkPath) || string.IsNullOrEmpty(pkPath)) &&
!session.properties.TryGetValue(SFSessionProperty.PRIVATE_KEY, out var pkContent))
(!session.properties.TryGetValue(SFSessionProperty.PRIVATE_KEY, out var pkContent) || string.IsNullOrEmpty(pkContent)))
{
// There is no PRIVATE_KEY_FILE defined, can't authenticate with key-pair
string invalidStringDetail =
Expand Down

0 comments on commit 280e00b

Please sign in to comment.