2011-08-12 10:52:29 +08:00
|
|
|
var helper = require(__dirname + '/test-helper');
|
|
|
|
|
|
|
|
helper.pg.defaults.poolIdleTimeout = 200;
|
|
|
|
|
|
|
|
test('idle timeout', function() {
|
2013-03-08 05:57:00 +08:00
|
|
|
helper.pg.connect(helper.config, assert.calls(function(err, client, done) {
|
2011-08-12 10:52:29 +08:00
|
|
|
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();
|
2011-08-12 10:52:29 +08:00
|
|
|
}));
|
|
|
|
});
|