Skip to content

Commit 6ebd078

Browse files
committed
test(daemon): leave the connection-cap test out of this Ruby fix
Restore tests/test_daemon_runtime.c to the PR's base, as asked in review: the dropped active_connections assertion is unrelated to the Ruby constructor callee and belongs in its own change. main has since reworked this test on its own (flaky-ledger item 12), so the merge of main that follows takes main's version. Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
1 parent b8adb14 commit 6ebd078

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

‎tests/test_daemon_runtime.c‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2677,15 +2677,10 @@ TEST(daemon_runtime_connection_cap_covers_slow_hello_and_stopping_is_terminal) {
26772677
if (accepted) {
26782678
overflow = cbm_daemon_runtime_client_connect(fixture.endpoint, &identity,
26792679
RUNTIME_TEST_TIMEOUT_MS, &overflow_result);
2680-
/* The "capacity" substring in the rejection message proves the reason.
2681-
* active_connections is NOT sampled here: on a loaded runner the
2682-
* server's HELLO timeout can fire for slow_hello between the raw
2683-
* connect and this read, making the count 1 instead of 2 — a
2684-
* scheduling race, not a product bug (see db91b88c for precedent).
2685-
* active_clients == 1 is safe because we still hold accepted. */
26862680
capacity_rejected = overflow == NULL &&
26872681
overflow_result.status == CBM_DAEMON_RUNTIME_CONNECT_REJECTED &&
26882682
strstr(overflow_result.message, "capacity") != NULL &&
2683+
cbm_daemon_runtime_service_active_connections(fixture.service) == 2 &&
26892684
cbm_daemon_runtime_service_active_clients(fixture.service) == 1;
26902685

26912686
cbm_daemon_ipc_connection_close(slow_hello);

0 commit comments

Comments
 (0)