Closed TheFive closed 6 years ago
Hi,
Before: This is not a bug in pg-pool, this is a problem in my test scripts.
I am using pg for a long time and have no switched to the new version using pg-pool.
In my mocha test environment I got very often the error message:
{ message: 'Connection terminated by user' }
depending on which time I put in this configuration
connectionTimeoutMillis: 500, idleTimeoutMillis: 500
After reducing the problem, the source was found, it was sinon.useFakeTimers in parallel with pg-pool
Ok, that a pool, that is managed by timeout, and a "stopped" timer are clashing is not really a surprise.
Does anyone has a hint how i can get working "simulated time" and pg-pool together ?
i have switched to mockdate which fits my need, and is working without trouble.
Hi,
Before: This is not a bug in pg-pool, this is a problem in my test scripts.
I am using pg for a long time and have no switched to the new version using pg-pool.
In my mocha test environment I got very often the error message:
depending on which time I put in this configuration
After reducing the problem, the source was found, it was sinon.useFakeTimers in parallel with pg-pool
Ok, that a pool, that is managed by timeout, and a "stopped" timer are clashing is not really a surprise.
Does anyone has a hint how i can get working "simulated time" and pg-pool together ?