-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Adding more e2e tests related to maintenance notifications. Extracting specific tests that validate notifications are received in new connections #3770
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
…cations are received in new connections
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request adds comprehensive end-to-end tests for Redis maintenance event notifications during cluster operations. The changes enhance the test suite to validate that notifications are properly received when new connections are established during maintenance states.
- Adds new test cases for failover, migration, and binding operations to validate notification handling
- Extracts specific test scenarios for new connections receiving maintenance events during cluster operations
- Improves timeout handling and error reporting in test infrastructure
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.
File | Description |
---|---|
tests/test_scenario/test_hitless_upgrade.py | Main test file with new test cases for failover notifications, connection handling during maintenance states, and improved timeout configurations |
tests/test_scenario/hitless_upgrade_helpers.py | Helper functions for failover operations and improved notification waiting with optional timeout failures |
tests/test_scenario/fault_injector_client.py | Minor improvements to type hints and error handling |
tests/test_scenario/conftest.py | Enhanced client configuration with additional parameters for protocol and host overrides |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
logging.info("Releasing connection back to the pool...") | ||
client_maint_events.connection_pool.release(conn) | ||
|
||
failover_thread.join() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You may configure your thread as daemon set daemon=True
and forget about join()
call. You're anyway used it just to trigger failover so at this stage it should be terminated anyway
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I want to be sure that the triggered operation is completed, because in the test clean up I revert the environment to its original configuration.
commands_threads = [] | ||
threads_count = 10 | ||
logging.info(f"Starting {threads_count} command execution threads...") | ||
for _ in range(threads_count): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can use ThreadPoolExecutor
to run multiple threads, this is more standard way to invoke such operations
Pull Request check-list
Please make sure to review and check all of these items:
NOTE: these things are not required to open a PR and can be done
afterwards / while the PR is open.
Description of change
All e2e tests can work with TLS enabled and with TLS disabled - depending on the configuration provided in endpoints_config dictionary.
The same test suite can be executed with both types of setup to validate all use cases with and without TLS.