File tree 2 files changed +14
-5
lines changed 2 files changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,10 @@ suite('Autocomplete', () => {
26
26
let isPython2 : boolean ;
27
27
let ioc : UnitTestIocContainer ;
28
28
29
- suiteSetup ( async ( ) => {
29
+ suiteSetup ( async function ( ) {
30
+ // Attempt to fix #1301
31
+ // tslint:disable-next-line:no-invalid-this
32
+ this . timeout ( 60000 ) ;
30
33
await initialize ( ) ;
31
34
initializeDI ( ) ;
32
35
isPython2 = await ioc . getPythonMajorVersion ( rootWorkspaceUri ) === 2 ;
Original file line number Diff line number Diff line change @@ -42,11 +42,17 @@ export async function initializeTest(): Promise<any> {
42
42
// Dispose any cached python settings (used only in test env).
43
43
PythonSettings . dispose ( ) ;
44
44
}
45
-
46
45
export async function closeActiveWindows ( ) : Promise < void > {
47
- return new Promise < void > ( ( resolve , reject ) => vscode . commands . executeCommand ( 'workbench.action.closeAllEditors' )
48
- // tslint:disable-next-line:no-unnecessary-callback-wrapper
49
- . then ( ( ) => resolve ( ) , reject ) ) ;
46
+ return new Promise < void > ( ( resolve , reject ) => {
47
+ vscode . commands . executeCommand ( 'workbench.action.closeAllEditors' )
48
+ // tslint:disable-next-line:no-unnecessary-callback-wrapper
49
+ . then ( ( ) => resolve ( ) , reject ) ;
50
+ // Attempt to fix #1301.
51
+ // Lets not waste too much time.
52
+ setTimeout ( ( ) => {
53
+ reject ( new Error ( 'Command \'workbench.action.closeAllEditors\' timedout' ) ) ;
54
+ } , 15000 ) ;
55
+ } ) ;
50
56
}
51
57
52
58
function getPythonPath ( ) : string {
You can’t perform that action at this time.
0 commit comments