Skip to content

Conversation

@mtmk
Copy link
Member

@mtmk mtmk commented Aug 19, 2025

This pull request adds a new test to verify NATS client behavior when the server's maximum connection limit is dynamically changed. The test ensures that clients correctly handle connection failures when the limit is exceeded, and successfully reconnect when the limit is increased again.

New test for dynamic max connection handling:

  • Added a Reconnect_on_max_connections test in ReconnectTests.cs to check client behavior when the server's max_connections is lowered and then raised, including proper reconnection and error handling.

Note test doesn't work with server v2.9.x since the reload function isn't there. We are removing 2.9 in #934 so CI should be good after that. If needed we can wait until that is merged.

@mtmk mtmk requested a review from wallyqs August 21, 2025 05:04
@mtmk mtmk requested a review from scottf August 21, 2025 09:09
@mtmk mtmk merged commit 2a0eff1 into main Aug 21, 2025
18 checks passed
@mtmk mtmk deleted the test-max-conn-reconnect branch August 21, 2025 09:22
fess9999 pushed a commit to TouchPlusIE/nats.net that referenced this pull request Sep 10, 2025
* Add reconnect tests for handling max connections

* Simplify tests configuration
@mtmk mtmk mentioned this pull request Sep 22, 2025
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.

3 participants