3 Commits

Author SHA1 Message Date
Sami Koskimäki
8771bd4781 Use tarn as pool (#2450)
* replace generic-pool with Tarn

* fix bug where mariadb client didn't propagate connection errors to pool

* destroy connection if a query times out (and cancellation is not enabled)

Before this change, when a query timeout happened without { cancel: true }
the connection was immediately released back to the pool. If the query
timed out because of a time consuming query, the released connection would
still execute the query to its end and the connection would be useless until
that time. This commit marks the connection as disposed so that the pool never
again gives that connection to anyone, and destorys it in the near future.

* fix a weird database version dependent casing bug in a tests

* fix an unstable test that failed randomly because the query order was not guaranteed
2018-02-07 11:17:17 +02:00
Mikael Lepistö
c0ac1077b6
More pool tests and test on borrow default (#2341)
* Test pool eviction when DB closes connection

* Added couple of tests for how pool works and added testOnBorrow to defaults
2017-11-19 18:43:28 +02:00
Mikael Lepistö
e405d669a6
Fixed passing connection errors directly to the query (#2336)
* Fixed passing connection errors directly to the query

* Added missing use strict and fixed select to be oracle compatible.

* Fixed dialect name which is mixed in different configs

* Oracledb didnt have database config attribute
2017-11-17 21:03:43 +02:00