Skip to content

Slim the mqttea error tests and table-ify dpf's node-label checks #2697

@chet

Description

@chet

mqttea's tests/errors.rs grew a large block of overlapping and low-value tests; dpf has a per-case node-label cluster and two duplicate config tests. One concern per table, and the tests that only exercise the stdlib or a timing threshold can go. Test-only; no behavior change.

Scope

mqttea

  • Collapse tests/errors.rs (~38 tests): the overlapping from-conversion, categorization, and Display / source duplicates fold into one check_cases table per concern (roughly a dozen functions removed).
  • Delete the assert_send / assert_sync compile-check tests and the Result / Option ergonomics tests (they exercise the stdlib, not our error type).
  • Delete the two timing/performance assertions (errors.rs and stats.rs); move to a bench if the measurement is wanted.

dpf

  • Collapse the six verify_node_labels_* tests into one check_cases_async table (sdk.rs).
  • Delete test_init_config_defaults (duplicates the types.rs defaults table) and test_init_config_custom (re-asserts fields it just set).
  • Merge dpu_phase_display_matches_as_ref into its as_ref sibling (types.rs).

Acceptance

  • Every error variant / node-label case still covered; the files shrink substantially with no coverage loss.
  • cargo test green for both crates; cargo clippy --all-features clean.

Size: M

Part of #2692.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No fields configured for Task.

    Projects

    Status
    In Progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions