Skip to content

Commit

Permalink
Merged QueryContext Cache and push again
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-ext-simba-jy committed Sep 22, 2023
1 parent 61c522d commit e03b910
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
5 changes: 3 additions & 2 deletions lib/connection/connection_config.js
Original file line number Diff line number Diff line change
Expand Up @@ -497,9 +497,9 @@ function ConnectionConfig(options, validateCredentials, qaMode, clientInfo)
let includeRetryReason = true;
if (Util.exists(options.includeRetryReason)) {
Errors.checkArgumentValid(Util.isBoolean(options.includeRetryReason),
ErrorCodes.ERR_CONN_CREATE_INVALID_INCLUDE_RETRY_REASON);
ErrorCodes.ERR_CONN_CREATE_INVALID_INCLUDE_RETRY_REASON);

includeRetryReason = options.includeRetryReason;
includeRetryReason = options.includeRetryReason;
}

/**
Expand Down Expand Up @@ -774,6 +774,7 @@ function ConnectionConfig(options, validateCredentials, qaMode, clientInfo)
return includeRetryReason;
}

/**
* Returns whether the Query Context Cache is enabled or not by the configuration
*
* @returns {Boolean}
Expand Down
2 changes: 1 addition & 1 deletion lib/constants/error_messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ exports[404038] = 'Invalid gcsUseDownscopedCredential. The specified value must
exports[404039] = 'Invalid forceStageBindError. The specified value must be a number.';
exports[404040] = 'Invalid browser timeout value. The specified value must be a positive number.';
exports[404041] = 'Invalid disablQueryContextCache. The specified value must be a boolean.';
exports[404042] = 'Invalid include retry reason. The specified value must be a boolean.'
exports[404042] = 'Invalid includeRetryReason. The specified value must be a boolean.'

// 405001
exports[405001] = 'Invalid callback. The specified value must be a function.';
Expand Down
12 changes: 6 additions & 6 deletions test/unit/connection/connection_config_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -515,26 +515,26 @@ describe('ConnectionConfig: basic', function ()
errorCode: ErrorCodes.ERR_CONN_CREATE_INVALID_GCS_USE_DOWNSCOPED_CREDENTIAL
},
{
name: 'invalid includeRetryReason',
name: 'invalid disableQueryContextCache',
options:
{
username: 'username',
password: 'password',
account: 'account',
includeRetryReason: 'invalid'
disableQueryContextCache: 1234
},
errorCode: ErrorCodes.ERR_CONN_CREATE_INVALID_INCLUDE_RETRY_REASON,
errorCode: ErrorCodes.ERR_CONN_CREATE_INVALID_DISABLED_QUERY_CONTEXT_CACHE,
},
{
name: 'invalid disableQueryContextCache',
name: 'invalid includeRetryReason',
options:
{
username: 'username',
password: 'password',
account: 'account',
disableQueryContextCache: 1234
includeRetryReason: 'invalid'
},
errorCode: ErrorCodes.ERR_CONN_CREATE_INVALID_DISABLED_QUERY_CONTEXT_CACHE,
errorCode: ErrorCodes.ERR_CONN_CREATE_INVALID_INCLUDE_RETRY_REASON,
},
];

Expand Down

0 comments on commit e03b910

Please sign in to comment.