Skip to content

Add unit tests for infrastructure and service modules #977

Description

@kcenon

What

Add dedicated unit tests for 6 untested infrastructure and service modules. Part of #953.

Scope

Module Source Path Category
client src/core/client.cpp Core base
server src/core/server.cpp Core base
health_monitor src/core/health_monitor.cpp Infrastructure
service_registry src/core/service_registry.cpp Infrastructure
memory_profiler src/core/memory_profiler.cpp Infrastructure
reliable_udp_client src/experimental/reliable_udp_client.cpp Experimental

Note: grpc_official_wrapper excluded — requires optional gRPC dependency (BUILD_GRPC_OFFICIAL=ON).

Why

  • client/server are the core base classes for all messaging implementations
  • health_monitor and service_registry provide runtime monitoring/discovery
  • memory_profiler tracks allocation patterns for performance analysis
  • Part of epic Expand unit test coverage from 40% to 80% #953 to raise coverage from ~48% to 80%

Where

  • Source: src/core/, src/experimental/
  • Tests: tests/unit/ (new test files)
  • CMake: tests/CMakeLists.txt (register new tests)

How

Technical Approach

  1. client/server: test lifecycle (create, start, stop), configuration, state transitions
  2. health_monitor: test health check registration, status reporting, threshold alerts
  3. service_registry: test service registration, discovery, deregistration
  4. memory_profiler: test allocation tracking, reporting, memory stats
  5. reliable_udp_client: test reliability layer, retransmission, ordering

Acceptance Criteria

  • All 6 modules have dedicated unit test files
  • Tests pass on local build and CI (Ubuntu, macOS)
  • No GTEST_SKIP() markers
  • Tests cover construction, public methods, and error paths

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions