fix(backend-test-utils): increase MySQL connect and pool timeouts

The mysql2 driver defaults to a 10-second connect timeout, which is
too short when many test suites share a single MySQL container under
CI load. Increase the connect timeout to 30 seconds and add pool
acquire/create timeouts of 30 seconds to reduce flaky ETIMEDOUT
failures.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
Fredrik Adelöw
2026-05-27 22:35:31 +02:00
parent a71ae90198
commit 6fe88aabb3
2 changed files with 3 additions and 0 deletions
@@ -176,6 +176,7 @@ export class MysqlEngine implements Engine {
connection: {
...this.#connection,
database: databaseName,
connectTimeout: 30_000,
},
...LARGER_POOL_CONFIG,
});
@@ -129,5 +129,7 @@ export const LARGER_POOL_CONFIG = {
pool: {
min: 0,
max: 50,
acquireTimeoutMillis: 30_000,
createTimeoutMillis: 30_000,
},
};