node-postgres/test/integration/connection-pool/idle-timeout-tests.js
Brian C 796a44f54f Remove internal pool (#1049)
* Initial work on removing internal pool

* Port backwards-compabible properties

* Cleanup test execution & makefile cruft

* Attempt to fix flakey error test
2016-06-21 09:53:09 -05:00

15 lines
404 B
JavaScript

var helper = require(__dirname + '/test-helper');
var _ = require('lodash')
const config = _.extend({ }, 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();
}));
});