Brian C 8798e50ad3 Re-enable eslint with standard format (#1367)
* Work on converting lib to standard

* Finish updating lib

* Finish linting lib

* Format test files

* Add .eslintrc with standard format

* Supply full path to eslint bin

* Move lint command to package.json

* Add eslint as dev dependency
2017-07-15 12:05:58 -05:00

32 lines
839 B
JavaScript

'use strict'
var helper = require('./../test-helper')
const suite = new helper.Suite()
helper.testPoolSize = function (max) {
suite.test(`test ${max} queries executed on a pool rapidly`, (cb) => {
const pool = new helper.pg.Pool({ max: 10 })
var sink = new helper.Sink(max, function () {
pool.end(cb)
})
for (var i = 0; i < max; i++) {
pool.connect(function (err, client, done) {
assert(!err)
client.query('SELECT * FROM NOW()')
client.query('select generate_series(0, 25)', function (err, result) {
assert.equal(result.rows.length, 26)
})
var query = client.query('SELECT * FROM NOW()', (err) => {
assert(!err)
sink.add()
done()
})
})
}
})
}
module.exports = Object.assign({}, helper, { suite: suite })