use supplied connection params in new tests
This commit is contained in:
parent
301f076f01
commit
07a049df96
@ -2,7 +2,7 @@ var helper = require(__dirname + '/test-helper');
|
|||||||
var util = require('util');
|
var util = require('util');
|
||||||
|
|
||||||
test('error during query execution', function() {
|
test('error during query execution', function() {
|
||||||
var client = new Client();
|
var client = new Client(helper.args);
|
||||||
client.connect(assert.success(function() {
|
client.connect(assert.success(function() {
|
||||||
var sleepQuery = 'select pg_sleep(5)';
|
var sleepQuery = 'select pg_sleep(5)';
|
||||||
client.query(sleepQuery, assert.calls(function(err, result) {
|
client.query(sleepQuery, assert.calls(function(err, result) {
|
||||||
@ -10,7 +10,7 @@ test('error during query execution', function() {
|
|||||||
client.end();
|
client.end();
|
||||||
assert.emits(client, 'end');
|
assert.emits(client, 'end');
|
||||||
}));
|
}));
|
||||||
var client2 = new Client();
|
var client2 = new Client(helper.args);
|
||||||
client2.connect(assert.success(function() {
|
client2.connect(assert.success(function() {
|
||||||
var killIdleQuery = "SELECT procpid, (SELECT pg_terminate_backend(procpid)) AS killed FROM pg_stat_activity WHERE current_query = $1";
|
var killIdleQuery = "SELECT procpid, (SELECT pg_terminate_backend(procpid)) AS killed FROM pg_stat_activity WHERE current_query = $1";
|
||||||
client2.query(killIdleQuery, [sleepQuery], assert.calls(function(err, res) {
|
client2.query(killIdleQuery, [sleepQuery], assert.calls(function(err, res) {
|
||||||
|
Loading…
Reference in New Issue
Block a user