Skip to content

test(mitos): cover connect_timeout_ms bounds in WireConfig::validate - #88

Merged
forkwright merged 1 commit into
mainfrom
test/55-connect-timeout-bounds
Aug 9, 2026
Merged

test(mitos): cover connect_timeout_ms bounds in WireConfig::validate#88
forkwright merged 1 commit into
mainfrom
test/55-connect-timeout-bounds

Conversation

@forkwright

Copy link
Copy Markdown
Owner

Refs #55

check_connect_timeout_ms enforces CONNECT_TIMEOUT_MS_BOUNDS at runtime and is correctly wired into WireConfig::validate (crates/mitos/src/config/mod.rs), but no test asserted on it. wire_bounds_are_enforced_at_both_ends covers max_header_bytes, key_response_body_multiplier, and response_read_chunk_bytes — skipping connect_timeout_ms entirely. The validator could be deleted or inverted and the suite would stay green.

Adds three tests:

  • connect_timeout_ms_bounds_are_enforced_at_both_ends — a value below the floor and a value above the ceiling are both rejected with the exact ConfigError::OutOfRange variant
  • connect_timeout_ms_at_the_bounds_is_accepted — the exact min and max are both accepted (inclusive-bound check)
  • connect_timeout_ms_zero_is_admissible_as_the_disabled_sentinel0 (the disabled-deadline sentinel, deliberately outside CONNECT_TIMEOUT_MS_BOUNDS) is accepted

No functional change — test-only.

check_connect_timeout_ms enforces CONNECT_TIMEOUT_MS_BOUNDS at runtime and
is wired into WireConfig::validate, but no test asserted on it -
wire_bounds_are_enforced_at_both_ends covers max_header_bytes,
key_response_body_multiplier, and response_read_chunk_bytes, skipping
connect_timeout_ms entirely. The validator could be deleted or inverted
and the suite would stay green.

Adds coverage for both rejection ends (below the floor, above the
ceiling), both inclusive boundary values (exact min and max accepted),
and the 0 sentinel (disables the deadline, deliberately outside the
range, always admissible).
@forkwright
forkwright merged commit 33f4a67 into main Aug 9, 2026
10 checks passed
@forkwright
forkwright deleted the test/55-connect-timeout-bounds branch August 9, 2026 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant