parent
810b23bf65
commit
9a1b17a46e
4 changed files with 7 additions and 11 deletions
|
@ -31,4 +31,4 @@ JOB:
|
|||
- x-pack-visualRegression
|
||||
|
||||
# `~` is yaml for `null`
|
||||
exclude: ~
|
||||
exclude: ~
|
|
@ -11,7 +11,7 @@ import { ConsoleLoggerFactory } from '../utils/console_logger_factory';
|
|||
import { TYPESCRIPT } from './language_servers';
|
||||
import { TypescriptServerLauncher } from './ts_launcher';
|
||||
|
||||
jest.setTimeout(10000);
|
||||
jest.setTimeout(15000);
|
||||
|
||||
// @ts-ignore
|
||||
const options: ServerOptions = createTestServerOption();
|
||||
|
@ -29,13 +29,12 @@ function delay(seconds: number) {
|
|||
});
|
||||
}
|
||||
|
||||
test.skip('typescript language server could be shutdown', async () => {
|
||||
test('typescript language server could be shutdown', async () => {
|
||||
const tsLauncher = new TypescriptServerLauncher('localhost', options, new ConsoleLoggerFactory());
|
||||
const proxy = await tsLauncher.launch(true, 1, TYPESCRIPT.embedPath!);
|
||||
await proxy.initialize(options.workspacePath);
|
||||
await delay(2);
|
||||
expect(tsLauncher.running).toBeTruthy();
|
||||
await proxy.initialize(options.workspacePath);
|
||||
await proxy.exit();
|
||||
await delay(2);
|
||||
await delay(3);
|
||||
expect(tsLauncher.running).toBeFalsy();
|
||||
});
|
||||
|
|
|
@ -245,12 +245,7 @@ export class LanguageServerProxy implements ILanguageServerHandler {
|
|||
}
|
||||
|
||||
private onSocketClosed() {
|
||||
const conn = this.clientConnection;
|
||||
this.clientConnection = null;
|
||||
if (conn) {
|
||||
conn.dispose();
|
||||
}
|
||||
|
||||
this.eventEmitter.emit('close');
|
||||
}
|
||||
|
||||
|
|
|
@ -33,6 +33,8 @@ export class TypescriptServerLauncher extends AbstractLauncher {
|
|||
return TS_LANG_DETACH_PORT;
|
||||
}
|
||||
|
||||
protected startupTimeout = 5000;
|
||||
|
||||
createExpander(
|
||||
proxy: LanguageServerProxy,
|
||||
builtinWorkspace: boolean,
|
||||
|
|
Loading…
Reference in a new issue