Skip to content

Commit

Permalink
revert debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-knozderko committed Apr 23, 2024
1 parent 9cbb66a commit e0ac1fb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 16 deletions.
4 changes: 2 additions & 2 deletions Snowflake.Data.Tests/IntegrationTests/SFDbCommandIT.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1393,7 +1393,7 @@ public void TestExecuteNormalQueryWhileAsyncExecQueryIsRunning()
SnowflakeDbConnection[] connections = new SnowflakeDbConnection[3];
for (int i = 0; i < connections.Length; i++)
{
connections[i] = new SnowflakeDbConnection(ConnectionString + "application=ExecNormalAndAsyncQueries");
connections[i] = new SnowflakeDbConnection(ConnectionString);
connections[i].Open();
}

Expand Down Expand Up @@ -1566,7 +1566,7 @@ public void TestGetStatusOfUnknownQueryId()

using (SnowflakeDbConnection conn = new SnowflakeDbConnection())
{
conn.ConnectionString = ConnectionString; // + "poolingEnabled=false"; !!!
conn.ConnectionString = ConnectionString;
conn.Open();

using (SnowflakeDbCommand cmd = (SnowflakeDbCommand)conn.CreateCommand())
Expand Down
16 changes: 2 additions & 14 deletions Snowflake.Data/Core/SFStatement.cs
Original file line number Diff line number Diff line change
Expand Up @@ -815,21 +815,9 @@ internal QueryStatus GetQueryStatus(string queryId)
{
QueryStatusResponse response = null;
bool receivedFirstQueryResponse = false;
int counter = 0;
while (!receivedFirstQueryResponse)
{
counter++;
logger.Warn($"Executing query to get status {counter} !!!");
response = _restRequester.Get<QueryStatusResponse>(queryRequest);
if (response.data == null)
{
logger.Warn($"No data in executed query status response {counter} !!!");
}
if (response.data.queries == null)
{
logger.Warn($"No queries in data in executed query status response {counter} !!!");
}
logger.Warn($"Executed query to get status {counter} !!! success: {response.success} code: {response.code} message: {response.message} data: {response.data}, queriesCount: {response.data.queries?.Count}");
if (SessionExpired(response))
{
SfSession.renewSession();
Expand Down Expand Up @@ -858,9 +846,9 @@ internal QueryStatus GetQueryStatus(string queryId)

return queryStatus;
}
catch(Exception e)
catch
{
logger.Error("Query execution failed.", e);
logger.Error("Query execution failed.");
throw;
}
finally
Expand Down

0 comments on commit e0ac1fb

Please sign in to comment.