Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[cypress] PostgreSQL Connection pool for System Tests (#43924)
* Use Connection pool for PostgreSQL in System Tests Sometimes single specs in the System Tests fail with: CypressError: `cy.task('queryDB')` failed with the following error: > duplicate key value violates unique constraint "cpostgresmax_users_pkey" The error happens on different specs in System Tests especially running on drone. It could be reproduced in running the System Tests tree times (first with installation, 2nd and 3rd run w/o): npx cypress run npx cypress run --spec 'tests/System/integration/administrator/**/*.cy.{js,jsx,ts,tsx},tests/System/integration/site/**/*.cy.{js,jsx,ts,tsx},tests/System/integration/api/**/*.cy.{js,jsx,ts,tsx},tests/System/integration/plugins/**/*.cy.{js,jsx,ts,tsx}' npx cypress run --spec 'tests/System/integration/administrator/**/*.cy.{js,jsx,ts,tsx},tests/System/integration/site/**/*.cy.{js,jsx,ts,tsx},tests/System/integration/api/**/*.cy.{js,jsx,ts,tsx},tests/System/integration/plugins/**/*.cy.{js,jsx,ts,tsx}' Checking the session usage in pgAdmin shows the maximum number of 100 configured sessions appears to have been reached. Therefore the usage of postgres connection pool is implemented. The session usage is reduced to max 12 and the error could no more reproduced. * Simplify implementation - Delete function as only called once - Renamed to postgresConnectionPool Contributed by @laoneo --------- Co-authored-by: Allon Moritz <allon.moritz@digital-peak.com>
- Loading branch information