Brian C f2b87e02f1 Add client connectionString tests (#1310)
* Remove redundant tests

* Add client connectionString test

Add test to ensure { connectionString } is respected as an argument to the client constructor

* Add test for connection string property

Also fixed some legacy require statements.
2017-06-07 22:58:03 -05:00

15 lines
393 B
JavaScript

var helper = require('./test-helper');
var _ = require('lodash')
const config = _.extend({ }, helper.config, { idleTimeoutMillis: 50 })
test('idle timeout', function() {
helper.pg.connect(config, assert.calls(function(err, client, done) {
assert.isNull(err);
client.query('SELECT NOW()');
//just let this one time out
//test will hang if pool doesn't timeout
done();
}));
});