Skip to content

Fix #837: Update test pool to use configured timeout settings - #999

Open
jotel-dev wants to merge 5 commits into
LabsCrypt:mainfrom
jotel-dev:837-pg-pool-timeout-settings
Open

Fix #837: Update test pool to use configured timeout settings#999
jotel-dev wants to merge 5 commits into
LabsCrypt:mainfrom
jotel-dev:837-pg-pool-timeout-settings

Conversation

@jotel-dev

Copy link
Copy Markdown
Contributor

escription
closes #837 by ensuring all pg.Pool instances use configurable timeout settings. The integration test was creating a raw pg.Pool without configuration, which has been updated to use the centralized createPgPoolConfig() function to match production behavior.

Type of Change
🐛 Bug fix (non-breaking change which fixes an issue)
✨ New feature (non-breaking change which adds functionality)
💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
📚 Documentation update
🔧 Refactoring (no functional changes)
⚡ Performance improvement
🧪 Test addition or update
Related Issues
Closes #837

Changes Made
Updated stream-lifecycle.test.ts to use createPgPoolConfig() instead of creating a raw pg.Pool
This ensures the test pool uses the same timeout settings as production (max, idleTimeoutMillis, connectionTimeoutMillis, statement_timeout)
The main application code (prisma.ts, seed.ts, pg-pool.ts) was already correctly configured with environment variables and sensible defaults
Environment variables for pool settings are already documented in .env.example
Testing
Test Coverage
Integration tests added/updated
Unit tests added/updated
Manual testing performed
Test Steps
The existing integration test suite now uses configured pool settings
Pool settings can be verified by checking that createPgPoolConfig() returns the expected values based on environment variables
Test database connections now respect the same timeout limits as production
Breaking Changes
None - this is a non-breaking change that only affects test configuration to match production behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Backend] pg.Pool created without max / idle / connection / statement timeout settings

1 participant