Skip to content

Commit

Permalink
increase timeouts for diagnostics tests
Browse files Browse the repository at this point in the history
  • Loading branch information
davidsemakula committed Sep 7, 2023
1 parent 1589584 commit 39724a4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/test/suite/diagnostics.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,8 @@ suite('Diagnostics', function () {
}

// Gets diagnostics (blocks for 500ms to wait for diagnostic notifications from language server).
// NOTE: Needed a max of about ~300ms on an AMD Ryzen 5900X CPU, so 1.5x headroom seems reasonable :-).
await sleep(750);
// NOTE: Needed a max of about ~300ms on an AMD Ryzen 5900X CPU, so ~2x headroom seems reasonable :-).
await sleep(1000);
const results = vscode.languages.getDiagnostics(docUri);

// Verifies expected results.
Expand Down
6 changes: 3 additions & 3 deletions src/test/suite/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ export function run(): Promise<void> {
ui: 'tdd',
color: true,
parallel: false,
// Increases timeout to 45s.
// (diagnostics tests have to block for ~750ms for each test to wait for language server push notifications).
timeout: 45000,
// Increases timeout to 60s.
// (diagnostics tests have to block for ~1s for each test to wait for language server push notifications).
timeout: 60000,
});

const testsRoot = path.resolve(__dirname, '..');
Expand Down

0 comments on commit 39724a4

Please sign in to comment.