-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Wrapper for fault injector and mock proxy service + cluster maint notifications e2e tests for node slots migration and node fail over #3882
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
Conversation
…fault injector as well as with proxy server
…cution. Updating standalone maint notifications tests. Adding cluster maint notifications test with slot migration and node fail over. Fix in the connection logic when applying relaxed_timeout.
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 PR introduces a comprehensive testing framework for cluster maintenance notifications by adding wrapper abstractions for fault injection and mock proxy services, along with end-to-end tests for node slots migration and node failover scenarios in both Redis Enterprise and OSS cluster configurations.
Key Changes
- Abstract fault injector interface with two implementations:
REFaultInjectorfor real Redis Enterprise clusters andProxyServerFaultInjectorfor mock-based testing - New test classes
TestStandaloneClientPushNotificationsandTestClusterClientPushNotificationsfor testing maintenance notifications in different client configurations - Support for both Redis standalone and RedisCluster clients in maintenance notification handling
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 17 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_scenario/test_maint_notifications.py | Refactored test structure into base and specific test classes; added comprehensive cluster client tests for failover and migration scenarios |
| tests/test_scenario/fault_injector_client.py | Introduced abstract FaultInjectorClient base with REFaultInjector and ProxyServerFaultInjector implementations for different test environments |
| tests/test_scenario/maint_notifications_helpers.py | Refactored to delegate cluster operations to fault injector implementations; added support for both Redis and RedisCluster clients |
| tests/test_scenario/conftest.py | Added new fixtures for cluster clients and proxy/RE environment detection; introduced cluster endpoint configuration support |
| tests/test_asyncio/test_scenario/conftest.py | Updated import to use renamed REFaultInjector class |
| tests/test_scenario/test_active_active.py | Added proper type hint for optional threading.Event parameter |
| tests/maint_notifications/proxy_server_helpers.py | Added RE cluster maintenance notification translation methods; improved error message clarity |
| tests/conftest.py | Added cluster-endpoint-name command line option for OSS API testing |
| redis/connection.py | Fixed potential deadlock by preventing timeout changes during non-blocking read operations |
| redis/_parsers/socket.py | Fixed bug using correct socket variable reference in recv call |
| redis/cluster.py | Moved comment to more appropriate location for code clarity |
| docker-compose.yml | Added default interceptors configuration for mock proxy service |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1fffcba
into
feat/hitless_upgrade_sync_cluster_client
…ifications e2e tests for node slots migration and node fail over (#3882) * Adding fault injector abstraction that would be able to work with re fault injector as well as with proxy server * Adding wrapper that will allow using the mock proxy for e2e tests execution. Updating standalone maint notifications tests. Adding cluster maint notifications test with slot migration and node fail over. Fix in the connection logic when applying relaxed_timeout. * Apply suggestions from code review --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Description of change
Please provide a description of the change here.
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.