diff options
author | Nathan Whitaker <17734409+nathanwhit@users.noreply.github.com> | 2024-05-15 11:38:45 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-15 11:38:45 -0700 |
commit | 3cea44abde3db770d3d4397297c3f4e949db2186 (patch) | |
tree | 54f5ab19b3db752f44d9246008a9a7f8f2bf97b0 /tests/integration/lsp_tests.rs | |
parent | 76234c63748b530839d17a31ef3d1fa9f3326238 (diff) |
chore: Fix flaky semantic tokens caching test (#23831)
The stderr stream from the LSP is consumed by a separate thread, so it
may not have processed the part we care about yet. Instead, wait until
you see the measure for the request you care about.
Diffstat (limited to 'tests/integration/lsp_tests.rs')
-rw-r--r-- | tests/integration/lsp_tests.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/integration/lsp_tests.rs b/tests/integration/lsp_tests.rs index 47fefeafe..2d5bb2e24 100644 --- a/tests/integration/lsp_tests.rs +++ b/tests/integration/lsp_tests.rs @@ -12740,7 +12740,7 @@ fn lsp_semantic_token_caching() { assert_eq!( client - .perf() + .perf_wait_for_measure("lsp.semantic_tokens_range") .measure_count("tsc.request.getEncodedSemanticClassifications"), 1, ); @@ -12755,7 +12755,7 @@ fn lsp_semantic_token_caching() { assert_eq!( client - .perf() + .perf_wait_for_measure("lsp.semantic_tokens_full") .measure_count("tsc.request.getEncodedSemanticClassifications"), 2, ); @@ -12775,7 +12775,7 @@ fn lsp_semantic_token_caching() { // make sure we actually used the cache assert_eq!( client - .perf() + .perf_wait_for_measure("lsp.semantic_tokens_range") .measure_count("tsc.request.getEncodedSemanticClassifications"), 2, ); |