node-postgres/test/integration/connection-pool/idle-timeout-tests.js

15 lines
404 B
JavaScript
Raw Normal View History

var helper = require(__dirname + '/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
2013-03-08 05:57:00 +08:00
done();
}));
});