This repository was archived by the owner on Dec 29, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +8
-10
lines changed Expand file tree Collapse file tree 3 files changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -175,10 +175,13 @@ fn client_test_simple_workspace() {
175175 let count = rls
176176 . messages ( )
177177 . iter ( )
178- . filter ( |msg| msg[ "method" ] == "window /progress" )
179- . filter ( |msg| msg[ "params" ] [ "title" ] == "Building " )
178+ . filter ( |msg| msg[ "method" ] == "$ /progress" )
179+ . filter ( |msg| msg[ "params" ] [ "value" ] [ "kind" ] == "report " )
180180 . filter ( |msg| {
181- msg[ "params" ] [ "message" ] . as_str ( ) . map ( |x| x. starts_with ( "member_" ) ) . unwrap_or ( false )
181+ msg[ "params" ] [ "value" ] [ "message" ]
182+ . as_str ( )
183+ . map ( |x| x. starts_with ( "member_" ) )
184+ . unwrap_or ( false )
182185 } )
183186 . count ( ) ;
184187 assert_eq ! ( count, 4 ) ;
Original file line number Diff line number Diff line change @@ -265,9 +265,7 @@ impl<T: AsyncRead + AsyncWrite> RlsHandle<T> {
265265 /// Blocks until the processing (building + indexing) is done by the RLS.
266266 #[ allow( clippy:: bool_comparison) ]
267267 pub fn wait_for_indexing ( & mut self ) {
268- self . wait_for_message ( |msg| {
269- msg[ "params" ] [ "title" ] == "Indexing" && msg[ "params" ] [ "done" ] == true
270- } ) ;
268+ self . wait_for_message ( |msg| msg[ "params" ] [ "value" ] [ "kind" ] == "end" ) ;
271269 }
272270
273271 /// Blocks until a "textDocument/publishDiagnostics" message is received.
Original file line number Diff line number Diff line change @@ -179,10 +179,7 @@ impl RlsHandle {
179179 |stdout| {
180180 stdout
181181 . to_json_messages ( )
182- . filter ( |json| {
183- json[ "params" ] [ "title" ] == "Indexing"
184- && json[ "params" ] [ "done" ] . as_bool ( ) . unwrap_or ( false )
185- } )
182+ . filter ( |json| json[ "params" ] [ "value" ] [ "kind" ] == "end" )
186183 . count ( )
187184 >= n
188185 } ,
You can’t perform that action at this time.
0 commit comments