()
| 14 | let errors = 0 |
| 15 | let shouldGet = 0 |
| 16 | function runErrorQuery() { |
| 17 | shouldGet++ |
| 18 | return new Promise(function (resolve, reject) { |
| 19 | pool |
| 20 | .query("SELECT 'asd'+1 ") |
| 21 | .then(function (res) { |
| 22 | reject(res) // this should always error |
| 23 | }) |
| 24 | .catch(function (err) { |
| 25 | errors++ |
| 26 | resolve(err) |
| 27 | }) |
| 28 | }) |
| 29 | } |
| 30 | const ps = [] |
| 31 | for (let i = 0; i < 5; i++) { |
| 32 | ps.push(runErrorQuery()) |