From 3d90e7fa68ee636479b2623e4634427e0f3261ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Hofman?= Date: Mon, 19 Feb 2024 20:02:53 +0100 Subject: [PATCH] Fix failures on mac --- Snowflake.Data.Tests/IntegrationTests/SFConnectionIT.cs | 8 ++++---- Snowflake.Data/Core/SFStatement.cs | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Snowflake.Data.Tests/IntegrationTests/SFConnectionIT.cs b/Snowflake.Data.Tests/IntegrationTests/SFConnectionIT.cs index fe9419939..fdcd0508b 100644 --- a/Snowflake.Data.Tests/IntegrationTests/SFConnectionIT.cs +++ b/Snowflake.Data.Tests/IntegrationTests/SFConnectionIT.cs @@ -1,8 +1,9 @@ /* - * Copyright (c) 2012-2021 Snowflake Computing Inc. All rights reserved. + * Copyright (c) 2012-2023 Snowflake Computing Inc. All rights reserved. */ using System.Data.Common; +using Snowflake.Data.Tests.Util; namespace Snowflake.Data.Tests.IntegrationTests { @@ -1841,7 +1842,7 @@ public void TestAsyncLoginTimeout() { using (var conn = new MockSnowflakeDbConnection()) { - int timeoutSec = 5; + int timeoutSec = 15; string loginTimeOut5sec = String.Format(ConnectionString + "connection_timeout={0};maxHttpRetries=0", timeoutSec); conn.ConnectionString = loginTimeOut5sec; @@ -1966,8 +1967,7 @@ public void TestAsyncConnectionFailFast() } catch (AggregateException e) { - Assert.AreEqual(SFError.INTERNAL_ERROR.GetAttribute().errorCode, - ((SnowflakeDbException)e.InnerException).ErrorCode); + SnowflakeDbExceptionAssert.HasErrorCode((SnowflakeDbException)e.InnerException, SFError.INTERNAL_ERROR); } Assert.AreEqual(ConnectionState.Closed, conn.State); diff --git a/Snowflake.Data/Core/SFStatement.cs b/Snowflake.Data/Core/SFStatement.cs index ef55cca9e..a8ada8af2 100644 --- a/Snowflake.Data/Core/SFStatement.cs +++ b/Snowflake.Data/Core/SFStatement.cs @@ -359,7 +359,7 @@ internal SFBaseResultSet Execute(int timeout, string sql, Dictionary bindings, bool describeOnly) + private SFBaseResultSet ExecuteSqlWithPutGet(int timeout, string sql, Dictionary bindings, bool describeOnly) { try { @@ -398,7 +398,7 @@ internal SFBaseResultSet ExecuteSqlWithPutGet(int timeout, string sql, Dictionar } } - internal SFBaseResultSet ExecuteSqlOtherThanPutGet(int timeout, string sql, Dictionary bindings, bool describeOnly) + private SFBaseResultSet ExecuteSqlOtherThanPutGet(int timeout, string sql, Dictionary bindings, bool describeOnly) { try {