Skip to content

Commit 28bcb8e

Browse files
Keen Yee LiauIgorMinar
Keen Yee Liau
authored andcommitted
fix: Flaky test on CI due to process timeout
This commit fixes the flaky CI test due to the termination of JSON-RPC client (mock-host) before the server actually processes all requests.
1 parent f0d3e2a commit 28bcb8e

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ language: node_js
22
sudo: false
33

44
node_js:
5-
- '6.9'
5+
- '8.11'
66

77
env:
88
matrix:
@@ -28,4 +28,4 @@ deploy:
2828
file: dist/ngls.vsix
2929
on:
3030
repo: angular/vscode-ng-language-service
31-
tags: true
31+
tags: true

tests/tools/mock-host/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,19 +41,19 @@ try {
4141
content = content.replace(RE_PWD, args['pwd']);
4242
}
4343
const json = JSON.parse(content);
44-
44+
4545
if (Array.isArray(json)) {
4646
for (const message of json) {
4747
writer.write(message as any);
4848
}
4949
}
5050

51-
// Do not terminate the process for 5 seconds to allow messages to
51+
// Do not terminate the process for 10 seconds to allow messages to
5252
// propagate. vscode-jsonrpc detects the process exit and terminates
5353
// the service. This prevents the detection from causing the test
5454
// to fail.
55-
setTimeout(() => {}, 5000);
55+
setTimeout(() => {}, 10000);
5656
} catch(e) {
5757
console.error(`Error: ${e.message}`);
5858
process.exit(2);
59-
}
59+
}

0 commit comments

Comments
 (0)