File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
ra_lsp_server/tests/heavy_tests Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -61,6 +61,7 @@ impl HirFileId {
61
61
db : & impl DefDatabase ,
62
62
file_id : HirFileId ,
63
63
) -> Option < TreeArc < SyntaxNode > > {
64
+ db. check_canceled ( ) ;
64
65
let _p = profile ( "parse_or_expand_query" ) ;
65
66
match file_id. 0 {
66
67
HirFileIdRepr :: File ( file_id) => Some ( db. parse ( file_id) . syntax ( ) . to_owned ( ) ) ,
Original file line number Diff line number Diff line change @@ -365,7 +365,6 @@ fn main() {{}}
365
365
librs, libs
366
366
) ) ;
367
367
server. wait_until_workspace_is_loaded ( ) ;
368
- eprintln ! ( "workspace loaded" ) ;
369
368
for i in 0 ..10 {
370
369
server. notification :: < DidOpenTextDocument > ( DidOpenTextDocumentParams {
371
370
text_document : TextDocumentItem {
@@ -376,7 +375,6 @@ fn main() {{}}
376
375
} ,
377
376
} ) ;
378
377
}
379
- eprintln ! ( "docs opened" ) ;
380
378
let start = std:: time:: Instant :: now ( ) ;
381
379
server. request :: < OnEnter > (
382
380
TextDocumentPositionParams {
@@ -407,5 +405,6 @@ fn main() {{}}
407
405
}
408
406
} ) ,
409
407
) ;
410
- eprintln ! ( "handled: {:?}" , start. elapsed( ) ) ;
408
+ let elapsed = start. elapsed ( ) ;
409
+ assert ! ( elapsed. as_millis( ) < 2000 , "typing enter took {:?}" , elapsed) ;
411
410
}
You can’t perform that action at this time.
0 commit comments