Skip to content

[Test🧪] Cover BrokerLiveTable heartbeat boundaries and lookup helpers #7616

Description

@mxsm

Prerequisites

  • I have searched existing test issues

Test Scope

Module: broker liveness table
File: rocketmq-namesrv/src/route/tables/live_table.rs
Coverage: extend existing BrokerLiveTable tests with timestamp boundary behavior and compatibility lookup helpers.

Test Cases

  • BrokerLiveInfo::is_alive returns true before the timeout and false at the exact timeout boundary.
  • BrokerLiveInfo::is_alive remains safe when current_time is earlier than last_update_timestamp.
  • update_last_update_timestamp_by_addr_info preserves timeout, data version, HA address, remote address, and channel id while updating only the timestamp.
  • get_broker_by_addr and get_broker_info_by_addr return None for unknown broker addresses.
  • Validate with cargo test -p rocketmq-namesrv live_table.

Willing to contribute?

  • I can submit a PR for this

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions