Skip to content

Add topology-change tests for host-id identity and endpoint replacement #926

Description

@dkropachev

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Fields

    No fields configured for Task.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions