diff --git a/news/3 Code Health/15573.md b/news/3 Code Health/15573.md new file mode 100644 index 000000000000..1f8c1e6aa833 --- /dev/null +++ b/news/3 Code Health/15573.md @@ -0,0 +1 @@ +Fix failing smoke tests on CI. diff --git a/src/test/smoke/datascience.smoke.test.ts b/src/test/smoke/datascience.smoke.test.ts index 23e1d3d94266..e2a034694a5b 100644 --- a/src/test/smoke/datascience.smoke.test.ts +++ b/src/test/smoke/datascience.smoke.test.ts @@ -10,7 +10,7 @@ import * as vscode from 'vscode'; import { JUPYTER_EXTENSION_ID } from '../../client/common/constants'; import { openFile, setAutoSaveDelayInWorkspaceRoot, waitForCondition } from '../common'; import { EXTENSION_ROOT_DIR_FOR_TESTS, IS_SMOKE_TEST } from '../constants'; -import { noop, sleep } from '../core'; +import { sleep } from '../core'; import { closeActiveWindows, initialize, initializeTest } from '../initialize'; import { verifyExtensionIsAvailable } from './common'; @@ -75,8 +75,8 @@ suite('Smoke Test: Datascience', () => { if (await fs.pathExists(outputFile)) { await fs.unlink(outputFile); } - // Ignore exceptions (as native editor closes the document as soon as its opened); - await openFile(file).catch(noop); + + await vscode.commands.executeCommand('jupyter.opennotebook', vscode.Uri.file(file)); // Wait for 15 seconds for notebook to launch. // Unfortunately there's no way to know for sure it has completely loaded.