Skip to content

merge - #1

Merged
mp911de merged 8 commits into
masterfrom
playground
Jun 18, 2014
Merged

mp911de merged 8 commits into
masterfrom
playground

Conversation

@mp911de

@mp911de mp911de commented Jun 18, 2014

Copy link
Copy Markdown
Collaborator

No description provided.

mp911de added a commit that referenced this pull request Jun 18, 2014
@mp911de
mp911de merged commit d4c1791 into master Jun 18, 2014
tishun added a commit that referenced this pull request Feb 3, 2025
* Introducing the FT.CREATE command

* Formatter issues

* Polishing #1
kiryazovi-redis added a commit that referenced this pull request Oct 2, 2025
…#3461)

* feat(CAE-1130): Add comprehensive connection testing for Redis Enterprise maintenance events

- Add ConnectionTesting class with 9 test scenarios for maintenance handoff behavior
- Test old connection graceful shutdown during MOVING operations
- Validate traffic resumption with autoconnect after handoff
- Verify maintenance notifications only work with RESP3 protocol
- Test new connection establishment during migration and bind phases
- Add memory leak validation for multiple concurrent connections
- Include TLS support testing for maintenance events
- Replace .supportMaintenanceEvents(true) with MaintenanceEventsOptions.enabled()
- Add comprehensive monitoring and validation of connection lifecycle

Tests cover CAE-1130 requirements for Redis Enterprise maintenance event handling
including connection draining, autoconnect behavior, and notification delivery.

* Add comprehensive maintenance events tests for CLIENT MAINT_NOTIFICATIONS

- connectionHandshakeIncludesEnablingNotificationsTest: Verifies all 5 notification types (MOVING, MIGRATING, MIGRATED, FAILING_OVER, FAILED_OVER) are received when maintenance events are enabled
- disabledDontReceiveNotificationsTest: Verifies no notifications received when maintenance events are disabled
- clientHandshakeWithEndpointTypeTest: Tests CLIENT MAINT_NOTIFICATIONS with 'none' endpoint type (nil IP scenario)
- clientMaintenanceNotificationInfoTest: Verifies CLIENT MAINT_NOTIFICATIONS configuration with moving-endpoint-type

Based on CLIENT MAINT_NOTIFICATIONS implementation from commit bd408cf

* Update Redis Enterprise maintenance event notification protocol

- Update push notification patterns to include sequence numbers (4-element format)
- Fix MOVING notification parsing to handle new address format with sequence and time
- Update MIGRATING, MIGRATED, FAILING_OVER, and FAILED_OVER patterns with sequence numbers
- Improve FaultInjectionClient status handling: change from 'pending' to 'running' checks
- Enhance JSON response parsing with better output field handling and debugging
- Remove deprecated maintenance sequence functionality and associated unit test
- Add test phase isolation to prevent cleanup notification interference
- Extend monitoring timeout from 2 to 5 minutes for longer maintenance operations
- Add @AfterEach cleanup to restore cluster state between tests
- Remove hardcoded optimal node selection logic in RedisEnterpriseConfig

This aligns with the updated Redis Enterprise maintenance events specification
and improves test reliability by handling the new notification protocol format.

* Fix moving tests for timeout de-relaxation after moving

* fix notification capture logic and several tests.

* fix up resp2 test, and add proper test for None, will rebase to master

* Fix None test

* Fix several tests related to handling. 5 tests left to fix up.

* fix up new connection test and connection leak tests

* fix up traffic test and remove un-needed code.

* fix more tests, remove more un-needed code

* revert log changes

* revert the re-throw change, to be discussed

* remove resp3 test after offline discussion

* change endpoint name

* temporarely reduce number of tests

* add more tests

* reduce test execution time by 50%

* remove hardcoded target config and enable working with 6 nodes and multiple dbs

* fix up relaxedtimeoutconfig to use newest functions and add connection handoff test

* add 1 more handoff test, add more logging, fix some issues that were raised during review

* fix some bugs and remove the un-needed clean-up of testing, to speed up tests by 50%

* Merge pull request #1 from kiryazovi-redis/CI-fix-functional-handoff-and-connection-testing-of-maint-events-2

Ci fix functional handoff and connection testing of maint events 2

* optimise relaxed timeoutest, fix compilation issues after renaming done by Ivo

* remove MaintenanceNotificationTest, as all functionality is covered now, also implement more fixes and improvements

* renamed memoryleak infra, refactored several tests, implemented more fixes from review, started removin comments

* remove any useless sleeps, refactor several tests again to be more functionally correct, enable logging for testing
tishun pushed a commit to yangy0000/lettuce that referenced this pull request Dec 5, 2025
…redis#3461)

* feat(CAE-1130): Add comprehensive connection testing for Redis Enterprise maintenance events

- Add ConnectionTesting class with 9 test scenarios for maintenance handoff behavior
- Test old connection graceful shutdown during MOVING operations
- Validate traffic resumption with autoconnect after handoff
- Verify maintenance notifications only work with RESP3 protocol
- Test new connection establishment during migration and bind phases
- Add memory leak validation for multiple concurrent connections
- Include TLS support testing for maintenance events
- Replace .supportMaintenanceEvents(true) with MaintenanceEventsOptions.enabled()
- Add comprehensive monitoring and validation of connection lifecycle

Tests cover CAE-1130 requirements for Redis Enterprise maintenance event handling
including connection draining, autoconnect behavior, and notification delivery.

* Add comprehensive maintenance events tests for CLIENT MAINT_NOTIFICATIONS

- connectionHandshakeIncludesEnablingNotificationsTest: Verifies all 5 notification types (MOVING, MIGRATING, MIGRATED, FAILING_OVER, FAILED_OVER) are received when maintenance events are enabled
- disabledDontReceiveNotificationsTest: Verifies no notifications received when maintenance events are disabled
- clientHandshakeWithEndpointTypeTest: Tests CLIENT MAINT_NOTIFICATIONS with 'none' endpoint type (nil IP scenario)
- clientMaintenanceNotificationInfoTest: Verifies CLIENT MAINT_NOTIFICATIONS configuration with moving-endpoint-type

Based on CLIENT MAINT_NOTIFICATIONS implementation from commit bd408cf

* Update Redis Enterprise maintenance event notification protocol

- Update push notification patterns to include sequence numbers (4-element format)
- Fix MOVING notification parsing to handle new address format with sequence and time
- Update MIGRATING, MIGRATED, FAILING_OVER, and FAILED_OVER patterns with sequence numbers
- Improve FaultInjectionClient status handling: change from 'pending' to 'running' checks
- Enhance JSON response parsing with better output field handling and debugging
- Remove deprecated maintenance sequence functionality and associated unit test
- Add test phase isolation to prevent cleanup notification interference
- Extend monitoring timeout from 2 to 5 minutes for longer maintenance operations
- Add @AfterEach cleanup to restore cluster state between tests
- Remove hardcoded optimal node selection logic in RedisEnterpriseConfig

This aligns with the updated Redis Enterprise maintenance events specification
and improves test reliability by handling the new notification protocol format.

* Fix moving tests for timeout de-relaxation after moving

* fix notification capture logic and several tests.

* fix up resp2 test, and add proper test for None, will rebase to master

* Fix None test

* Fix several tests related to handling. 5 tests left to fix up.

* fix up new connection test and connection leak tests

* fix up traffic test and remove un-needed code.

* fix more tests, remove more un-needed code

* revert log changes

* revert the re-throw change, to be discussed

* remove resp3 test after offline discussion

* change endpoint name

* temporarely reduce number of tests

* add more tests

* reduce test execution time by 50%

* remove hardcoded target config and enable working with 6 nodes and multiple dbs

* fix up relaxedtimeoutconfig to use newest functions and add connection handoff test

* add 1 more handoff test, add more logging, fix some issues that were raised during review

* fix some bugs and remove the un-needed clean-up of testing, to speed up tests by 50%

* Merge pull request redis#1 from kiryazovi-redis/CI-fix-functional-handoff-and-connection-testing-of-maint-events-2

Ci fix functional handoff and connection testing of maint events 2

* optimise relaxed timeoutest, fix compilation issues after renaming done by Ivo

* remove MaintenanceNotificationTest, as all functionality is covered now, also implement more fixes and improvements

* renamed memoryleak infra, refactored several tests, implemented more fixes from review, started removin comments

* remove any useless sleeps, refactor several tests again to be more functionally correct, enable logging for testing
uglide added a commit that referenced this pull request Aug 6, 2026
…3865)

* Add API consistency test suite for the command interface flavors

Introduce reflection-based unit tests that verify the sync, async,
reactive, Kotlin coroutine and cluster node-selection command
interfaces stay in lockstep, replacing the consistency-by-regeneration
guarantee of the template-based API generators:

- CommandInterfaces: catalog of all command groups and their flavors
- KnownApiDeviations: single registry of intentional deviations,
  ported from the generator rule tables
- TypeSignatures: shared reflection and type-normalization helpers
- SyncAsync/SyncReactive/NodeSelection/AggregateInterface/
  CommandBuilderCoverage/KotlinCoroutines consistency tests

The suite checks method parity in both directions, the per-flavor
return-type mapping (RedisFuture, Mono/Flux, suspend/Flow,
Executions), aggregate interface wiring and interface-to-command-
builder coverage. Sync/async parity is load-bearing at runtime: the
sync API is a dynamic proxy over async (FutureSyncInvocationHandler).

Supersedes SyncAsyncApiConvergenceUnitTests. Adds kotlin-reflect as a
test dependency.

Note: at this commit the suite documents real drift in the committed
interfaces — several tests fail intentionally; the deviations are
fixed in the follow-up commit.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* Fix API deviations surfaced by the consistency test suite

Real drift found by the new consistency tests, accumulated while the
API generators were out of use:

- RedisCoroutinesCommands did not extend RediSearchCoroutinesCommands
  (the implementation already delegated to it)
- Kotlin coroutine API was missing bitopDiff/bitopDiff1/bitopAndor/
  bitopOne, hgetex(key, fields), hsetex(key, map) and the
  xackdel/xdelex stream commands
- reactive hgetdel/hgetex streaming-channel variants were missing
  their @deprecated marker

The node-selection aggregate wiring drift (missing ACL/Array groups,
async aggregate extending the sync Stream interface) is exempted via
KnownApiDeviations.NODE_SELECTION_AGGREGATE_PENDING — fixing it is a
breaking change scheduled for the 8.0 release.

Makes the API consistency test suite pass.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* Address review feedback for the API consistency suite

- verify the methods declared directly on the aggregate interfaces
  (auth, select, the CLUSTER commands, ...) against their async and
  reactive counterparts, restoring coverage the removed
  SyncAsyncApiConvergenceUnitTests had via RedisCommands.getMethods()
- include RedisClusterCoroutinesCommands in the aggregate wiring check
  and add its missing FUNCTION/JSON/VECTOR_SET/ARRAY/SEARCH groups
  (experimental API; the impl already delegates per group)
- keep the Kotlin generator's FLOW_METHODS in sync with the hand-added
  Flow methods for as long as the generators still exist
- add behavioral coroutine integration tests for the new
  hash-field-expiry, BITOP and stream-deletion commands

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* Verify parameter signatures and @deprecated parity across API flavors

Erased-parameter matching alone would accept flavors whose generic
parameter signatures diverge (e.g. Map<K, V> vs Map<V, K>), and
nothing compared @deprecated across the Java flavors. The suite now
verifies both for sync/async, sync/reactive, node-selection and the
aggregate-declared methods. The reactive dispatch parameter mutation
(CommandOutput<K, V, ?>) and the intentional deprecation of the
CommandOutput-based node-selection dispatch overloads are recorded in
KnownApiDeviations.

Fixes surfaced by the new checks: RedisAdvancedClusterReactiveCommands
.keysLegacy and RedisAdvancedClusterAsyncCommands.masters carried a
@deprecated tag without the matching @deprecated annotation.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* move coroutines check to kotlin (#3871)

* Code review by @tishun
Coroutine return types are effectively unchecked.
Coroutine parameter generics unchecked.
The catalog isn't verified complete. CommandInterfaces calls itself "the single place where a new command group must be registered", but nothing asserts every io.lettuce.core.api.sync.*Commands interface appears in it. A group added without registering is invisible
PubSub isn't covered at all.
Coroutine aggregates only get an extends check. AGGREGATE_FLAVORS (:101-105) is sync/async/reactive triples; RedisCoroutinesCommands/RedisClusterCoroutinesCommands declare their own methods, and the branch had to hand-patch the latter.
Javadoc is out of scope entirely
Staleness is tested for one table only.

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: atakavci <a_takavci@yahoo.com>
Co-authored-by: Tihomir Mateev <tihomir.mateev@gmail.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.

1 participant

⌂ 换网址