Skip to content

Commit

Permalink
Snow 55371 (#29)
Browse files Browse the repository at this point in the history
* SNOW-55371: Re-enable testCancel.js
  • Loading branch information
smtakeda authored Mar 20, 2019
1 parent 95fa5b3 commit 6be8049
Show file tree
Hide file tree
Showing 65 changed files with 137 additions and 65 deletions.
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright (c) 2013-2018 Snowflake Computing, Inc.
Copyright (c) 2013-2019 Snowflake Computing, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015-2018 Snowflake Computing Inc. All rights reserved.
* Copyright (c) 2015-2019 Snowflake Computing Inc. All rights reserved.
*/

module.exports = require('./lib/snowflake');
2 changes: 1 addition & 1 deletion lib/agent/https_ocsp_agent.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015-2018 Snowflake Computing Inc. All rights reserved.
* Copyright (c) 2015-2019 Snowflake Computing Inc. All rights reserved.
*/

var Util = require('../util');
Expand Down
2 changes: 1 addition & 1 deletion lib/agent/ocsp_response_cache.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015-2018 Snowflake Computing Inc. All rights reserved.
* Copyright (c) 2015-2019 Snowflake Computing Inc. All rights reserved.
*/

var SimpleCache = require('simple-lru-cache');
Expand Down
2 changes: 1 addition & 1 deletion lib/agent/socket_util.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015-2018 Snowflake Computing Inc. All rights reserved.
* Copyright (c) 2015-2019 Snowflake Computing Inc. All rights reserved.
*/

var check = require('./check');
Expand Down
2 changes: 1 addition & 1 deletion lib/browser.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015-2018 Snowflake Computing Inc. All rights reserved.
* Copyright (c) 2015-2019 Snowflake Computing Inc. All rights reserved.
*/

var core = require('./core');
Expand Down
2 changes: 1 addition & 1 deletion lib/connection/connection.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015-2018 Snowflake Computing Inc. All rights reserved.
* Copyright (c) 2015-2019 Snowflake Computing Inc. All rights reserved.
*/
const uuidv4 = require('uuid/v4');

Expand Down
2 changes: 1 addition & 1 deletion lib/connection/connection_config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015-2018 Snowflake Computing Inc. All rights reserved.
* Copyright (c) 2015-2019 Snowflake Computing Inc. All rights reserved.
*/

var Util = require('../util');
Expand Down
2 changes: 1 addition & 1 deletion lib/connection/connection_context.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015-2018 Snowflake Computing Inc. All rights reserved.
* Copyright (c) 2015-2019 Snowflake Computing Inc. All rights reserved.
*/

var Util = require('../util');
Expand Down
2 changes: 1 addition & 1 deletion lib/connection/result/chunk.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015-2018 Snowflake Computing Inc. All rights reserved.
* Copyright (c) 2015-2019 Snowflake Computing Inc. All rights reserved.
*/

var EventEmitter = require('events').EventEmitter;
Expand Down
2 changes: 1 addition & 1 deletion lib/connection/result/chunk_cache.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015-2018 Snowflake Computing Inc. All rights reserved.
* Copyright (c) 2015-2019 Snowflake Computing Inc. All rights reserved.
*/

var DoublyLinkedList = require('./doubly_linked_list');
Expand Down
2 changes: 1 addition & 1 deletion lib/connection/result/column.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015-2018 Snowflake Computing Inc. All rights reserved.
* Copyright (c) 2015-2019 Snowflake Computing Inc. All rights reserved.
*/

var Util = require('../../util');
Expand Down
2 changes: 1 addition & 1 deletion lib/connection/result/data_types.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015-2018 Snowflake Computing Inc. All rights reserved.
* Copyright (c) 2015-2019 Snowflake Computing Inc. All rights reserved.
*/

var Util = require('../../util');
Expand Down
2 changes: 1 addition & 1 deletion lib/connection/result/doubly_linked_list.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015-2018 Snowflake Computing Inc. All rights reserved.
* Copyright (c) 2015-2019 Snowflake Computing Inc. All rights reserved.
*/

function DoublyLinkedList()
Expand Down
2 changes: 1 addition & 1 deletion lib/connection/result/result.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015-2018 Snowflake Computing Inc. All rights reserved.
* Copyright (c) 2015-2019 Snowflake Computing Inc. All rights reserved.
*/

var EventEmitter = require('events').EventEmitter;
Expand Down
2 changes: 1 addition & 1 deletion lib/connection/result/result_stream.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015-2018 Snowflake Computing Inc. All rights reserved.
* Copyright (c) 2015-2019 Snowflake Computing Inc. All rights reserved.
*/

var EventEmitter = require('events').EventEmitter;
Expand Down
2 changes: 1 addition & 1 deletion lib/connection/result/row_stream.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015-2018 Snowflake Computing Inc. All rights reserved.
* Copyright (c) 2015-2019 Snowflake Computing Inc. All rights reserved.
*/

var Readable = require('stream').Readable;
Expand Down
2 changes: 1 addition & 1 deletion lib/connection/result/sf_timestamp.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015-2018 Snowflake Computing Inc. All rights reserved.
* Copyright (c) 2015-2019 Snowflake Computing Inc. All rights reserved.
*/

var Moment = require('moment-timezone');
Expand Down
2 changes: 1 addition & 1 deletion lib/connection/result/statement_type.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015-2018 Snowflake Computing Inc. All rights reserved.
* Copyright (c) 2015-2019 Snowflake Computing Inc. All rights reserved.
*/

exports.isDml = function(statementTypeId)
Expand Down
2 changes: 1 addition & 1 deletion lib/connection/statement.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015-2018 Snowflake Computing Inc. All rights reserved.
* Copyright (c) 2015-2019 Snowflake Computing Inc. All rights reserved.
*/

const uuidv4 = require('uuid/v4');
Expand Down
2 changes: 1 addition & 1 deletion lib/constants/error_messages.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015-2018 Snowflake Computing Inc. All rights reserved.
* Copyright (c) 2015-2019 Snowflake Computing Inc. All rights reserved.
*/

// 400001
Expand Down
2 changes: 1 addition & 1 deletion lib/core.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015-2018 Snowflake Computing Inc. All rights reserved.
* Copyright (c) 2015-2019 Snowflake Computing Inc. All rights reserved.
*/

var Util = require('./util');
Expand Down
2 changes: 1 addition & 1 deletion lib/errors.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015-2018 Snowflake Computing Inc. All rights reserved.
* Copyright (c) 2015-2019 Snowflake Computing Inc. All rights reserved.
*/

var Util = require('./util');
Expand Down
2 changes: 1 addition & 1 deletion lib/global_config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015-2018 Snowflake Computing Inc. All rights reserved.
* Copyright (c) 2015-2019 Snowflake Computing Inc. All rights reserved.
*/

var Util = require('./util');
Expand Down
2 changes: 1 addition & 1 deletion lib/http/base.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015-2018 Snowflake Computing Inc. All rights reserved.
* Copyright (c) 2015-2019 Snowflake Computing Inc. All rights reserved.
*/
const uuidv4 = require('uuid/v4');

Expand Down
2 changes: 1 addition & 1 deletion lib/http/browser.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015-2018 Snowflake Computing Inc. All rights reserved.
* Copyright (c) 2015-2019 Snowflake Computing Inc. All rights reserved.
*/

var Util = require('../util');
Expand Down
2 changes: 1 addition & 1 deletion lib/http/node.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015-2018 Snowflake Computing Inc. All rights reserved.
* Copyright (c) 2015-2019 Snowflake Computing Inc. All rights reserved.
*/

var Url = require('url');
Expand Down
2 changes: 1 addition & 1 deletion lib/logger.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015-2018 Snowflake Computing Inc. All rights reserved.
* Copyright (c) 2015-2019 Snowflake Computing Inc. All rights reserved.
*/

var BrowserLogger = require('./logger/browser');
Expand Down
2 changes: 1 addition & 1 deletion lib/logger/browser.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015-2018 Snowflake Computing Inc. All rights reserved.
* Copyright (c) 2015-2019 Snowflake Computing Inc. All rights reserved.
*/

var Util = require('../util');
Expand Down
2 changes: 1 addition & 1 deletion lib/logger/core.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015-2018 Snowflake Computing Inc. All rights reserved.
* Copyright (c) 2015-2019 Snowflake Computing Inc. All rights reserved.
*/

var moment = require('moment');
Expand Down
2 changes: 1 addition & 1 deletion lib/logger/node.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015-2018 Snowflake Computing Inc. All rights reserved.
* Copyright (c) 2015-2019 Snowflake Computing Inc. All rights reserved.
*/

var winston = require('winston');
Expand Down
2 changes: 1 addition & 1 deletion lib/parameters.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015-2018 Snowflake Computing Inc. All rights reserved.
* Copyright (c) 2015-2019 Snowflake Computing Inc. All rights reserved.
*/

var Util = require('./util');
Expand Down
2 changes: 1 addition & 1 deletion lib/services/large_result_set.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015-2018 Snowflake Computing Inc. All rights reserved.
* Copyright (c) 2015-2019 Snowflake Computing Inc. All rights reserved.
*/

var EventEmitter = require('events').EventEmitter;
Expand Down
2 changes: 1 addition & 1 deletion lib/services/sf.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015-2018 Snowflake Computing Inc. All rights reserved.
* Copyright (c) 2015-2019 Snowflake Computing Inc. All rights reserved.
*/

/*
Expand Down
2 changes: 1 addition & 1 deletion lib/snowflake.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015-2018 Snowflake Computing Inc. All rights reserved.
* Copyright (c) 2015-2019 Snowflake Computing Inc. All rights reserved.
*/

var core = require('./core');
Expand Down
2 changes: 1 addition & 1 deletion lib/util.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015-2018 Snowflake Computing Inc. All rights reserved.
* Copyright (c) 2015-2019 Snowflake Computing Inc. All rights reserved.
*
*/

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "snowflake-sdk",
"version": "1.1.10",
"version": "1.1.11",
"description": "Node.js driver for Snowflake",
"dependencies": {
"agent-base": "^2.1.1",
Expand Down
2 changes: 1 addition & 1 deletion test/integration/connectionOptions.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015-2018 Snowflake Computing Inc. All rights reserved.
* Copyright (c) 2015-2019 Snowflake Computing Inc. All rights reserved.
*/
var snowflakeTestProtocol = process.env.SNOWFLAKE_TEST_PROTOCOL;
var snowflakeTestHost = process.env.SNOWFLAKE_TEST_HOST;
Expand Down
2 changes: 1 addition & 1 deletion test/integration/sharedStatements.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015-2018 Snowflake Computing Inc. All rights reserved.
* Copyright (c) 2015-2019 Snowflake Computing Inc. All rights reserved.
*/

const setTimezoneToPST = "alter session set TIMEZONE='America/Los_Angeles'";
Expand Down
2 changes: 1 addition & 1 deletion test/integration/testBind.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015-2018 Snowflake Computing Inc. All rights reserved.
* Copyright (c) 2015-2019 Snowflake Computing Inc. All rights reserved.
*/
var async = require('async');
var assert = require('assert');
Expand Down
72 changes: 72 additions & 0 deletions test/integration/testCancel.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
var async = require('async');
var testUtil = require('./testUtil');

describe('Test Cancel Query', function ()
{
var connection;
var longQuery = 'select count(*) from table(generator(timeLimit => 3600))';

before(function (done)
{
connection = testUtil.createConnection();
async.series(
[
function (callback)
{
testUtil.connect(connection, callback);
}
],
done
);
});

after(function (done)
{
async.series(
[
function (callback)
{
testUtil.destroyConnection(connection, callback);
}
],
done
);
});


it('testCancelQuerySimple', function (done)
{
var statement = connection.execute({
sqlText: longQuery
});

setTimeout(function ()
{
statement.cancel(function (err)
{
testUtil.checkError(err);
done();
});
}, 10000);
});
});




















2 changes: 1 addition & 1 deletion test/integration/testConcurrent.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015-2018 Snowflake Computing Inc. All rights reserved.
* Copyright (c) 2015-2019 Snowflake Computing Inc. All rights reserved.
*/
var async = require('async');
var assert = require('assert');
Expand Down
2 changes: 1 addition & 1 deletion test/integration/testConnection.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015-2018 Snowflake Computing Inc. All rights reserved.
* Copyright (c) 2015-2019 Snowflake Computing Inc. All rights reserved.
*/
var snowflake = require('./../../lib/snowflake');
var async = require('async');
Expand Down
2 changes: 1 addition & 1 deletion test/integration/testConnectionNegative.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015-2018 Snowflake Computing Inc. All rights reserved.
* Copyright (c) 2015-2019 Snowflake Computing Inc. All rights reserved.
*/
var snowflake = require('./../../lib/snowflake');
var assert = require('assert');
Expand Down
2 changes: 1 addition & 1 deletion test/integration/testDataType.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015-2018 Snowflake Computing Inc. All rights reserved.
* Copyright (c) 2015-2019 Snowflake Computing Inc. All rights reserved.
*/
var async = require('async');
var testUtil = require('./testUtil');
Expand Down
2 changes: 1 addition & 1 deletion test/integration/testExecute.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015-2018 Snowflake Computing Inc. All rights reserved.
* Copyright (c) 2015-2019 Snowflake Computing Inc. All rights reserved.
*/
var async = require('async');
var testUtil = require('./testUtil');
Expand Down
2 changes: 1 addition & 1 deletion test/integration/testLargeResultSet.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015-2018 Snowflake Computing Inc. All rights reserved.
* Copyright (c) 2015-2019 Snowflake Computing Inc. All rights reserved.
*/
var assert = require('assert');
var async = require('async');
Expand Down
Loading

0 comments on commit 6be8049

Please sign in to comment.