Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Force GCP strange behaviour #561

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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