Skip to content

Commit

Permalink
Reduce logging and retry widget test (#9905)
Browse files Browse the repository at this point in the history
  • Loading branch information
DonJayamanne authored May 9, 2022
1 parent bd421a3 commit 10b68b6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/kernels/kernelProvider.base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,11 @@ export abstract class BaseKernelProvider implements IKernelProvider {
protected disposeOldKernel(uri: Uri) {
const notebook = workspace.notebookDocuments.find((nb) => nb.uri.toString() === uri.toString());
if (notebook) {
traceInfoIfCI(
`Disposing kernel associated with ${getDisplayPath(notebook.uri)}, isClosed=${notebook.isClosed}`
);

const kernelToDispose = this.kernelsByNotebook.get(notebook);
if (kernelToDispose) {
traceInfoIfCI(
`Disposing kernel associated with ${getDisplayPath(notebook.uri)}, isClosed=${notebook.isClosed}`
);
this.pendingDisposables.add(kernelToDispose.kernel);
kernelToDispose.kernel
.dispose()
Expand All @@ -127,9 +126,9 @@ export abstract class BaseKernelProvider implements IKernelProvider {
}
this.kernelsByNotebook.delete(notebook);
} else {
traceInfoIfCI(`Disposing kernel associated with ${getDisplayPath(uri)}`);
const kernelToDispose = this.kernelsByUri.get(uri.toString());
if (kernelToDispose) {
traceInfoIfCI(`Disposing kernel associated with ${getDisplayPath(uri)}`);
this.pendingDisposables.add(kernelToDispose.kernel);
kernelToDispose.kernel
.dispose()
Expand Down
2 changes: 2 additions & 0 deletions src/test/datascience/widgets/standard.vscode.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ suite('Standard IPyWidget (Execution) (slow) (WIDGET_TEST)', function () {
this.timeout(120_000);
let previousWidgetScriptSourcesSettingValue: string[] | undefined = undefined;
const widgetScriptSourcesValue = ['jsdelivr.com', 'unpkg.com'];
// Retry at least once, because ipywidgets can be flaky (network, comms, etc).
this.retries(1);
suiteSetup(async function () {
traceInfo('Suite Setup VS Code Notebook - Execution');
this.timeout(120_000);
Expand Down

0 comments on commit 10b68b6

Please sign in to comment.