diff --git a/test/smoke/src/main.ts b/test/smoke/src/main.ts index ab2586f5c9e5f38fe17a30ff7fc4335b39f929d7..ea4f1365bf246d5bdd4402c25062d0a581b69455 100644 --- a/test/smoke/src/main.ts +++ b/test/smoke/src/main.ts @@ -27,6 +27,7 @@ import { setup as setupDataExtensionTests } from './areas/extensions/extensions. import { setup as setupTerminalTests } from './areas/terminal/terminal.test'; import { setup as setupDataMultirootTests } from './areas/multiroot/multiroot.test'; import { setup as setupDataLocalizationTests } from './areas/workbench/localization.test'; +import { polling } from './vscode/code'; const tmpDir = tmp.dirSync({ prefix: 't' }) as { name: string; removeCallback: Function; }; const testDataPath = tmpDir.name; @@ -287,6 +288,8 @@ describe('Test', () => { const name = this.currentTest.fullTitle().replace(/[^a-z0-9\-]/ig, '_'); const screenshotPath = path.join(screenshotsPath, `${name}.png`); + + console.log('Last poll message: ', polling.lastTimeoutMessage); fs.writeFileSync(screenshotPath, buffer); }); } diff --git a/test/smoke/src/vscode/code.ts b/test/smoke/src/vscode/code.ts index 039bd05d4a2e83aebc1a90ccb82c24f07c91094c..5240380e776e119052517e27be0e23c3a47a4883 100644 --- a/test/smoke/src/vscode/code.ts +++ b/test/smoke/src/vscode/code.ts @@ -139,6 +139,10 @@ export async function spawn(options: SpawnOptions): Promise { return connect(child, outPath, handle, options.verbose); } +export const polling = { + lastTimeoutMessage: '' +}; + async function poll( fn: () => Promise, acceptFn: (result: T) => boolean, @@ -155,6 +159,7 @@ async function poll( let result; try { + polling.lastTimeoutMessage = timeoutMessage; result = await fn(); if (acceptFn(result)) {