gh#144: the turn queue serialises callers in FIFO order

Tests › tests/unit/mcp/external_bridge_test.cpp

absent Not in the packaged run: no test report names it.

What this test is for

Why it exists

The test says nothing about why.

tests/unit/mcp/external_bridge_test.cpp:1035 · its file's page

What it checks (14)

  1. CHECK_FALSE(bridge.turn_in_flight()) observes turn_in_flight
  2. CHECK(bridge.turn_queue_depth() == 0) observes turn_queue_depth
  3. REQUIRE(bridge.begin_turn_wait(5000, &waited)) observes begin_turn_wait
  4. CHECK(bridge.turn_in_flight()) observes turn_in_flight
  5. CHECK(bridge.turn_queue_depth() == 0) observes turn_queue_depth
  6. CHECK(waited < 1000) not attributed
  7. CHECK_FALSE(bridge.turn_in_flight()) observes turn_in_flight
  8. REQUIRE(bridge.begin_turn_wait(5000, &waited)) observes begin_turn_wait
  9. CHECK(bridge.turn_queue_depth() == 3) observes turn_queue_depth
  10. CHECK(bridge.turn_in_flight()) observes turn_in_flight
  11. REQUIRE(admitted.size() == 3) not attributed
  12. CHECK(admitted == std::vector<int>{1, 2, 3}) not attributed
  13. CHECK(bridge.turn_queue_depth() == 0) observes turn_queue_depth
  14. CHECK_FALSE(bridge.turn_in_flight()) observes turn_in_flight

Where the product reaches it

No product flow reaches this code: no product entry point's flow calls any of the functions this test calls.

Call flow

gh#144: the turn queue serialises callers in FIFO order→turn_in_flight→turn_queue_depth→WHEN→REQUIRE→begin_turn_wait→end_turn_wait

What it reaches

Each row runs from this test, through the calls it makes, to the code a requirement names. If that code breaks, the test's checks are what should catch it. Reaching is not proving: a check only proves what it observes. No mutation records were given, so these rows say what the test REACHES.

gh#144: the turn queue serialises callers in FIFO order · 14 checksWHENfailure_detailREQ-API-012 · inferredbegin_turn_waitREQ-BRIDGE-001 · inferred
Also reaches 2 requirements

Its run touches their code; that is reach, not proof.