node-postgres/test/integration/connection-pool/idle-timeout-tests.js
Alexander Sulfrian f698ed4459 use config dict in all test
instead of the connection string use the config dict in all tests to
be able to specify things like binary mode
2011-11-22 05:00:54 +01:00

13 lines
340 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) {
assert.isNull(err);
client.query('SELECT NOW()');
//just let this one time out
//test will hang if pool doesn't timeout
}));
});