Skip to content

Commit

Permalink
Reduce wait time in tests for diagnostics
Browse files Browse the repository at this point in the history
  • Loading branch information
davelopez committed Sep 30, 2022
1 parent a72dd54 commit 6e6dfb7
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions client/tests/e2e/suite/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,17 @@ export async function openDocument(docUri: vscode.Uri): Promise<vscode.TextDocum

export async function activateAndOpenInEditor(docUri: vscode.Uri): Promise<DocumentEditor> {
await activate();
const documentEditor = await openDocumentInEditor(docUri);
await sleep(2000); // Wait for server activation
return documentEditor;
return openDocumentInEditor(docUri);
}

export async function sleep(ms: number): Promise<void> {
return new Promise((resolve) => setTimeout(resolve, ms));
}

export async function waitForDiagnostics(): Promise<void> {
return sleep(500);
}

export const getDocPath = (filePath: string): string => {
return path.resolve(
__dirname,
Expand Down

0 comments on commit 6e6dfb7

Please sign in to comment.