DEV: Reduce pool size for test environment to 1 (#25584)

Why this change?

I have been investigating transaction related issues with our system
tests and I have a hard time figuring out what is causing the problem.
To help simplify our environment further, we will set the pool size in
the test environment to 1 so that it is impossible for us to be fetching
a different connection between the threads since they all share the
connection pool.

Also set `reaping_frequency` to `0` to ensure we don't reap any
connection ensuring the same connection is always used.
This commit is contained in:
Alan Guo Xiang Tan 2024-02-07 11:10:17 +08:00 committed by GitHub
parent 95a2d285d3
commit f9789e974b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 2 deletions

View File

@ -242,7 +242,7 @@ jobs:
if: matrix.build_type == 'system' && matrix.target == 'plugins' if: matrix.build_type == 'system' && matrix.target == 'plugins'
run: | run: |
GLOBIGNORE="plugins/chat/*"; GLOBIGNORE="plugins/chat/*";
PREFABRICATION=0 LOAD_PLUGINS=1 RAILS_ENABLE_TEST_LOG=1 RAILS_TEST_LOG_LEVEL=error PARALLEL_TEST_PROCESSORS=4 bin/turbo_rspec --use-runtime-info --profile=50 --verbose --format documentation plugins/*/spec/system LOAD_PLUGINS=1 RAILS_ENABLE_TEST_LOG=1 RAILS_TEST_LOG_LEVEL=error PARALLEL_TEST_PROCESSORS=4 bin/turbo_rspec --use-runtime-info --profile=50 --verbose --format documentation plugins/*/spec/system
shell: bash shell: bash
timeout-minutes: 30 timeout-minutes: 30

View File

@ -36,7 +36,8 @@ test:
adapter: postgresql adapter: postgresql
database: <%= test_db %> database: <%= test_db %>
min_messages: warning min_messages: warning
pool: 5 pool: 1
reaping_frequency: 0
host_names: host_names:
- test.localhost - test.localhost