Skip to content

Commit f516914

Browse files
committed
trying to fix microsoft#1382
1 parent 3ae2793 commit f516914

2 files changed

Lines changed: 11 additions & 10 deletions

File tree

src/vs/workbench/test/common/api/extHostApiCommands.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ suite('ExtHostLanguageFeatureCommands', function() {
123123
// });
124124
});
125125

126-
test('WorkspaceSymbols, back and forth', function(done) {
126+
test('WorkspaceSymbols, back and forth', function(done) {
127127

128128
disposables.push(extHost.registerWorkspaceSymbolProvider(<vscode.WorkspaceSymbolProvider>{
129129
provideWorkspaceSymbols(query): any {
@@ -176,7 +176,7 @@ suite('ExtHostLanguageFeatureCommands', function() {
176176
// });
177177
});
178178

179-
test('Definition, back and forth', function(done) {
179+
test('Definition, back and forth', function(done) {
180180

181181
disposables.push(extHost.registerDefinitionProvider(defaultSelector, <vscode.DefinitionProvider>{
182182
provideDefinition(doc: any): any {

src/vs/workbench/test/common/api/testThreadService.ts

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,8 @@
66
'use strict';
77

88
import {NullThreadService} from 'vs/platform/test/common/nullThreadService';
9-
import {create} from 'vs/base/common/types';
109
import {SyncDescriptor0} from 'vs/platform/instantiation/common/descriptors';
1110
import {TPromise} from 'vs/base/common/winjs.base';
12-
import {IInstantiationService} from 'vs/platform/instantiation/common/instantiation';
1311

1412
export class TestThreadService extends NullThreadService {
1513

@@ -21,10 +19,12 @@ export class TestThreadService extends NullThreadService {
2119
return this._callCountValue;
2220
}
2321

24-
private set _callCount(value:number) {
22+
private set _callCount(value: number) {
2523
this._callCountValue = value;
2624
if (this._callCountValue === 0) {
27-
this._completeIdle && this._completeIdle();
25+
if (this._completeIdle) {
26+
this._completeIdle();
27+
}
2828
this._idle = undefined;
2929
}
3030
}
@@ -49,18 +49,19 @@ export class TestThreadService extends NullThreadService {
4949

5050
protected _registerAndInstantiateMainProcessActor<T>(id: string, descriptor: SyncDescriptor0<T>): T {
5151

52-
let _calls:{path: string; args: any[] }[] = [];
52+
let _calls: {path: string; args: any[] }[] = [];
5353
let _instance: any;
5454

5555
return this._getOrCreateProxyInstance({
5656

57-
5857
callOnRemote: (proxyId: string, path: string, args: any[]): TPromise<any> => {
5958

6059
this._callCount++;
6160
_calls.push({path, args});
6261

63-
return TPromise.timeout(0).then(() => {
62+
return new TPromise<any>((c) => {
63+
setTimeout(c, 0);
64+
}).then(() => {
6465
if (!_instance) {
6566
_instance = this._instantiationService.createInstance(descriptor.ctor);
6667
}
@@ -91,4 +92,4 @@ export class TestThreadService extends NullThreadService {
9192
}
9293

9394
const Instance = new TestThreadService();
94-
export default Instance;
95+
export default Instance;

0 commit comments

Comments
 (0)