Skip to content

Conversation

@petyaslavova
Copy link
Collaborator

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:

  • Do tests and lints pass with this change?
  • Do the CI tests pass with this change (enable it first in your forked repo and wait for the github action build to finish)?
  • Is the new or changed code fully tested?
  • Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?
  • Is there an example added to the examples folder (if applicable)?

NOTE: these things are not required to open a PR and can be done
afterwards / while the PR is open.

…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.
Copy link
Contributor

Copilot AI left a 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: REFaultInjector for real Redis Enterprise clusters and ProxyServerFaultInjector for mock-based testing
  • New test classes TestStandaloneClientPushNotifications and TestClusterClientPushNotifications for 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.

petyaslavova and others added 6 commits December 15, 2025 14:37
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>
@petyaslavova petyaslavova merged commit 1fffcba into feat/hitless_upgrade_sync_cluster_client Dec 15, 2025
4 checks passed
@petyaslavova petyaslavova deleted the ps_wrap_mock_proxy_and_fault_injector branch December 15, 2025 15:52
petyaslavova added a commit that referenced this pull request Dec 15, 2025
…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>
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