Skip to content

Commit 36c92c7

Browse files
committed
Ignore Diagnostic status messages when waiting for idle
1 parent 61b7346 commit 36c92c7

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

test/integrationTests/poll.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,10 @@ export async function poll<T>(
7272
duration: number,
7373
step: number,
7474
expression: (input: T) => boolean = defaultPollExpression): Promise<T> {
75+
let value: T;
76+
7577
while (duration > 0) {
76-
let value = await getValue();
78+
value = await getValue();
7779

7880
if (expression(value)) {
7981
return value;

test/integrationTests/testAssets/testAssets.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export class TestAssetWorkspace {
7575
async waitForIdle(stream: EventStream, timeout: number = 25 * 1000): Promise<void> {
7676
let event: BaseEvent = { type: 0 };
7777

78-
const subscription = stream.subscribe((e: BaseEvent) => event = e);
78+
const subscription = stream.subscribe((e: BaseEvent) => e.type !== EventType.ProjectDiagnosticStatus && (event = e));
7979

8080
await poll(() => event, timeout, 500, e => !e || (event = null));
8181

0 commit comments

Comments
 (0)