Skip to content

Commit

Permalink
Force GCP strange behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-dprzybysz committed Jul 3, 2023
1 parent 3e64de5 commit 0d67c56
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
3 changes: 3 additions & 0 deletions lib/services/large_result_set.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ function LargeResultSetService(connectionConfig, httpClient)
// invoked when the request completes
const callback = function callback(err, response, body)
{
if (response) {
Logger.getInstance().trace(`Response: content-type is ${response.getResponseHeader('Content-Type')} and content-encoding is ${response.getResponseHeader('Content-Encoding')}`)
}
// err happens on timeouts and response is passed when server responded
if (err || isUnsuccessfulResponse(response))
{
Expand Down
8 changes: 7 additions & 1 deletion test/integration/testLargeResultSet.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
const assert = require('assert');
const async = require('async');
const testUtil = require('./testUtil');
const { configureLogger } = require('../configureLogger');

const sourceRowCount = 10000;

describe('Large result Set Tests', function ()
describe.only('Large result Set Tests', function ()
{
let connection;
const selectAllFromOrders = `select randstr(1000,random()) from table(generator(rowcount=>${sourceRowCount}))`;
Expand All @@ -16,8 +17,13 @@ describe('Large result Set Tests', function ()
{
connection = testUtil.createConnection();
await testUtil.connectAsync(connection);
// setting ROWS_PER_RESULTSET causes invalid, not encoded chunks from GCP
await testUtil.executeCmdAsync(connection, 'alter session set ROWS_PER_RESULTSET = 1000000');
});

beforeEach(() => configureLogger('TRACE'));
afterEach(() => configureLogger('ERROR'));

after(async () =>
{
await testUtil.destroyConnectionAsync(connection);
Expand Down

0 comments on commit 0d67c56

Please sign in to comment.