@@ -8,8 +8,8 @@ import type { ElixirLS } from "../../extension";
8
8
import { WorkspaceMode } from "../../project" ;
9
9
import {
10
10
getExtension ,
11
- sleep ,
12
11
waitForLanguageClientManagerUpdate ,
12
+ waitForNoLanguageClientManagerUpdate ,
13
13
waitForWorkspaceUpdate ,
14
14
} from "../utils" ;
15
15
@@ -180,10 +180,10 @@ suite("Multi root workspace tests", () => {
180
180
const fileUri = vscode . Uri . file (
181
181
path . join ( fixturesPath , "sample_umbrella" , "apps" , "child2" , "mix.exs" ) ,
182
182
) ;
183
- const document = await vscode . workspace . openTextDocument ( fileUri ) ;
184
- await vscode . window . showTextDocument ( document ) ;
185
-
186
- await sleep ( 3000 ) ;
183
+ await waitForNoLanguageClientManagerUpdate ( extension , async ( ) => {
184
+ const document = await vscode . workspace . openTextDocument ( fileUri ) ;
185
+ await vscode . window . showTextDocument ( document ) ;
186
+ } ) ;
187
187
188
188
assert . ok ( ! extension . exports . languageClientManager . defaultClient ) ;
189
189
assert . equal ( extension . exports . languageClientManager . clients . size , 2 ) ;
@@ -196,7 +196,7 @@ suite("Multi root workspace tests", () => {
196
196
vscode . workspace . updateWorkspaceFolders ( addedWorkspaceFolder . index , 1 ) ;
197
197
} ) ;
198
198
199
- await sleep ( 3000 ) ;
199
+ await waitForNoLanguageClientManagerUpdate ( extension , ( ) => { } ) ;
200
200
201
201
assert . equal ( extension . exports . languageClientManager . clients . size , 2 ) ;
202
202
} ) . timeout ( 30000 ) ;
0 commit comments