Parent epic: #921
Problem
The host identity and endpoint replacement refactor changes behavior across metadata, control connection refresh, sessions, pools, policies, and route state. The current tests do not provide enough focused coverage for host-id identity, endpoint movement, replacement semantics, and stale async publication.
Desired coverage
Add focused unit and integration coverage for:
Host.__eq__ and Host.__hash__ using stable identity;
- same
host_id, changed endpoint;
- same endpoint, different
host_id;
- metadata
_hosts and _host_id_by_endpoint consistency;
- control connection refresh resolving hosts by
host_id first;
- session pool renewal/removal after endpoint replacement;
- load-balancing policy host membership after endpoint movement;
- token-aware routing and replica filtering under stable host identity;
- stale pool creation and stale connection callbacks being discarded;
- client route stickiness/state when keyed by stable host identity.
Scope
- Prefer unit tests for identity semantics, metadata index behavior, and generation fencing.
- Add integration tests only where live cluster behavior is required, such as real endpoint/IP movement or replacement.
- Keep long-running integration cases gated by the existing test environment conventions.
Acceptance criteria
Part of #921. Supports #867, #922, #923, #924, #925, and #813.
Parent epic: #921
Problem
The host identity and endpoint replacement refactor changes behavior across metadata, control connection refresh, sessions, pools, policies, and route state. The current tests do not provide enough focused coverage for host-id identity, endpoint movement, replacement semantics, and stale async publication.
Desired coverage
Add focused unit and integration coverage for:
Host.__eq__andHost.__hash__using stable identity;host_id, changed endpoint;host_id;_hostsand_host_id_by_endpointconsistency;host_idfirst;Scope
Acceptance criteria
Part of #921. Supports #867, #922, #923, #924, #925, and #813.