node-postgres/test/integration/connection-pool/idle-timeout-tests.js
2013-03-07 15:57:00 -06:00

14 lines
357 B
JavaScript

var helper = require(__dirname + '/test-helper');
helper.pg.defaults.poolIdleTimeout = 200;
test('idle timeout', function() {
helper.pg.connect(helper.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();
}));
});