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