Skip to content

Cover or reshape the two live-process arms in Node #2197

Description

@gaborbernat

Problem

crates/peryx-test-support/src/lib.rs:823 and :852 are the last two uncovered lines in that crate, and both sit in Node, the live-process harness. One is an HTTP-refused arm, the other a second startup-wait arm.

Node's fields are private and no unit test constructs it, so neither line can be reached from peryx-test-support's own tests. Covering them needs a spawned binary.

Why this is separate

Reaching these two lines means adding a live-process test, and per #990 / #992 any such test has to be a submodule of the availability binary rather than a standalone tests/*.rs — otherwise --all-features runs it in the fast test job, which has no toxiproxy, and it races and fails there.

So the cost is a live-process test living in another crate's binary, to cover two lines, using machinery peryx-test-support does not otherwise need for its own tests. That is a different kind of work from the rest of #2166, which is why it is filed on its own rather than folded into that PR.

Required change

Decide between two dispositions, and say which in the PR:

  1. Cover them with a live-process test placed as a submodule of the availability binary, driving a refused HTTP connection and a startup wait that needs a second poll.
  2. Restructure Node so the two arms are reachable without a spawned process — for instance by making the wait and the probe take an injectable transport, the way claimed(candidates: impl Iterator<Item = u16>) already lets a test drive port exhaustion without touching the real band.

Prefer the second if a seam exists that production code would accept. Establish which before writing.

Acceptance criteria

  • Both lines are covered, or removed if either turns out to be unreachable, with the citation either way.
  • No new standalone tests/*.rs drives a live process.
  • The fast test job stays green with --all-features, and no new test depends on toxiproxy outside the availability binary.

Boundary

Only these two lines and whatever seam they need. Do not restructure the rest of Node, and do not move existing live-process tests.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:testsConformance, perf tests, and observabilitypriority:P2Performance, observability, or deferred featuretype:testTesting, conformance, metrics, or validation coverage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions