mirror of
https://github.com/brianc/node-postgres.git
synced 2025-12-08 20:16:25 +00:00
* Remove unsupported Node versions 0.10 and 0.12 from CI * Replace deprecated Buffer constructor with .from/.alloc * Remove Promise polyfill * Make use of Object.assign * Remove checks for versions of Node earlier than 4 * Remove Buffer#indexOf fallback for Node 0.10
14 lines
383 B
JavaScript
14 lines
383 B
JavaScript
var helper = require(__dirname + '/test-helper');
|
|
|
|
const config = Object.assign({ }, 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();
|
|
}));
|
|
});
|