Skip to content

Comments

Fix/Tests: ConnectionPool unit tests and performance optimization#115

Open
Pranav-1100 wants to merge 1 commit intoakave-ai:mainfrom
Pranav-1100:connectionpool-fix
Open

Fix/Tests: ConnectionPool unit tests and performance optimization#115
Pranav-1100 wants to merge 1 commit intoakave-ai:mainfrom
Pranav-1100:connectionpool-fix

Conversation

@Pranav-1100
Copy link

Fix : #101
Summary
This PR fixes a performance bottleneck in ConnectionPool where slow connections were blocking the whole pool. I also added full unit tests for the module.

Changes
sdk/connection.py: Moved the heavy connection creation logic outside of the thread lock. Now, if one node is slow to respond, it won't freeze the app for everyone else.
tests/unit/test_connection.py: Added full test coverage for the module. I also fixed a concurrency test that was failing randomly in CI.

Validation :-
Ran the connection tests locally and all 23 tests passed

Screenshot 2026-02-12 at 11 13 06 PM

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.

CI: Unit Tests for Connection Module

1 participant