Expand description
Test-only hold points for blocking-pool work.
The responsiveness regression tests need to prove a notification handler’s
synchronous work runs off the connection’s serve future. Requests can pin
that with a pure ordering check (see assert_stays_responsive in the test
harness), but a notification has no response to order against — earlier
versions fell back to wall-clock budgets, which flaked on loaded CI
runners. A gate makes the check deterministic instead: the test arms a
named section, the handler’s blocking closure parks in pass until
released, and the test asserts the server still answers a probe while the
work is provably in flight. On a correct build that holds under any
scheduling; on a regressed (inline) build the serve future itself parks,
no later message is processed, and the probe times out — a hard failure,
never a flake.
Production builds compile the whole mechanism out: without the
test-hooks feature (enabled only for test targets, via the self
dev-dependency in Cargo.toml) DebugGate is a zero-sized no-op and the
hold/release custom methods are never registered, so a real client cannot
arm anything.
Structs§
Constants§
- GATE_
CODE_ ACTION_ RESOLVE - Gate section around
codeAction/resolve’s deferred action generation. - GATE_
COMPLETION_ RESOLVE - Gate section around
completion_resolve’s all-indexes signature/doc lookup. - GATE_
DID_ CHANGE_ WATCHED_ FILES - Gate section around
did_change_watched_files’ batched parse closure. - GATE_
DID_ CLOSE_ DISK_ SYNC - Gate section around
did_close’s on-disk resynchronization. - GATE_
DID_ OPEN_ PARSE - Gate section around
did_open’s parse-diagnostics closure. - GATE_
DID_ SAVE_ DIAGNOSTICS - Gate section around
did_save’s diagnostics-recompute closure. - GATE_
DOCUMENT_ LINK - Gate section around
document_link’s AST walk plus@link/@seescan. - GATE_
DOCUMENT_ SYMBOL - Gate section around
document_symbol’s AST walk. - GATE_
FOLDING_ RANGE - Gate section around
folding_range’s AST walk plus comment/region scan. - GATE_
GOTO_ DEFINITION - Gate section around
goto_definition’s same-document/index fallback work. - GATE_
GOTO_ IMPLEMENTATION - Gate section around
goto_implementation’s method-decl cursor check. - GATE_
GOTO_ TYPE_ DEFINITION - Gate section around
goto_type_definition’s exact-resolution chain. - GATE_
INLAY_ HINT_ RESOLVE - Gate section around
inlay_hint_resolve’s all-indexes doc lookup. - GATE_
INLINE_ VALUE - Gate section around
inline_value’s range text scan. - GATE_
LINKED_ EDITING_ RANGE - Gate section around
linked_editing_range’s highlight/class-scoping walk. - GATE_
MONIKER - Gate section around
moniker’s AST member lookup. - GATE_
ON_ TYPE_ FORMATTING - Gate section around
on_type_formatting’s whole-document scan. - GATE_
PREPARE_ CALL_ HIERARCHY - Gate section around
prepare_call_hierarchy’s indexed-lookup closure. - GATE_
PREPARE_ RENAME - Gate section around
prepare_rename’s keyword member-access check. - GATE_
REFERENCES_ VARIABLE - Gate section around
references’ same-document variable walk. - GATE_
RENAME_ VARIABLE - Gate section around
rename’s property-decl cursor check + variable rename. - GATE_
SELECTION_ RANGE - Gate section around
selection_range’s AST-walk closure. - GATE_
SEMANTIC_ TOKENS_ FULL - Gate section around
semantic_tokens_full’s AST walk. - GATE_
SEMANTIC_ TOKENS_ FULL_ DELTA - Gate section around
semantic_tokens_full_delta’s AST walk. - GATE_
SEMANTIC_ TOKENS_ RANGE - Gate section around
semantic_tokens_range’s AST walk. - GATE_
TYPE_ HIERARCHY - Gate section around type-hierarchy lookup/result construction.
- GATE_
USAGE_ SYMBOL_ RETRY - Gate section around the usage-symbol settle-wait in
handle_references/indexed_rename, held right after mir’s own per-file resolution first comes back empty (companion file not yet known) and before the wait-then-retry — lets a test force a companion declaring file to open while mir’s resolution attempt is still in flight, so the retry can observe mir resolving it correctly instead of falling through to the AST-heuristic FQN fallback. - GATE_
WILL_ DELETE_ FILES - Gate section around
will_delete_files’use-edit batch closure. - GATE_
WILL_ RENAME_ FILES - Gate section around
will_rename_files’use-edit batch closure.