rust-lang / rust-lang/rust-analyzer

`diagnostics_dont_block_typing` test is flaky

Open
#20,220 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

C-bug
Dominant language
Rust
Stars
16.9k
Forks
2.2k
Avg merge
1d 12h
Merged PRs (30d)
72

Description

    failures:
        diagnostics_dont_block_typing

    test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 34 filtered out; finished in 42.17s

  stderr ───

    thread 'diagnostics_dont_block_typing' panicked at crates\rust-analyzer\tests\slow-tests\main.rs:938:5:
    typing enter took 3.2540789s
    stack backtrace:
       0: std::panicking::begin_panic_handler
                 at /rustc/6b00bc3880198600130e1cf62b8f8a93494488cc/library\std\src\panicking.rs:697
       1: core::panicking::panic_fmt
                 at /rustc/6b00bc3880198600130e1cf62b8f8a93494488cc/library\core\src\panicking.rs:75
       2: slow_tests::diagnostics_dont_block_typing
                 at .\tests\slow-tests\main.rs:938
       3: slow_tests::diagnostics_dont_block_typing::closure$0
                 at .\tests\slow-tests\main.rs:882
       4: core::ops::function::FnOnce::call_once<slow_tests::diagnostics_dont_block_typing::closure_env$0,tuple$<> >
                 at C:\Users\runneradmin\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\core\src\ops\function.rs:250
       5: core::ops::function::FnOnce::call_once
                 at /rustc/6b00bc3880198600130e1cf62b8f8a93494488cc/library\core\src\ops\function.rs:250
    note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

[> 60.000s] rust-analyzer::slow-tests completes_items_from_standard_library
[> 60.000s] rust-analyzer::slow-tests resolve_proc_macro
────────────
     Summary [ 142.236s] 7085 tests run: 7084 passed (2 slow), 1 failed, 7 skipped
        FAIL [  42.204s] rust-analyzer::slow-tests diagnostics_dont_block_typing

We got this test failing more often these days

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with crates/rust-analyzer/tests/slow-tests/main.rs, especially diagnostics_dont_block_typing around lines 882 and 938, and reproduce the reported failure where typing enter takes 3.254 seconds. Compare the test's timing behavior with the other slow tests. Done means diagnostics_dont_block_typing runs reliably without false failures while still checking that diagnostics do not block typing.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
performance, testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.