diff --git a/src/api.proposed.kernelApi.d.ts b/src/api.proposed.kernelApi.d.ts index 62f9f4a21d1..9741d4fbe6c 100644 --- a/src/api.proposed.kernelApi.d.ts +++ b/src/api.proposed.kernelApi.d.ts @@ -4,12 +4,7 @@ import type { Event, Uri } from 'vscode'; declare module './api' { - export interface Kernel { - status: 'unknown' | 'starting' | 'idle' | 'busy' | 'terminating' | 'restarting' | 'autorestarting' | 'dead'; - onDidChangeStatus: Event< - 'unknown' | 'starting' | 'idle' | 'busy' | 'terminating' | 'restarting' | 'autorestarting' | 'dead' - >; - } + export interface Kernel {} export interface Kernels { /** * Finds a kernel for a given resource. diff --git a/src/kernels/api/api.vscode.common.test.ts b/src/kernels/api/api.vscode.common.test.ts index 1b9716f3fe1..048bd984151 100644 --- a/src/kernels/api/api.vscode.common.test.ts +++ b/src/kernels/api/api.vscode.common.test.ts @@ -5,15 +5,7 @@ import { assert } from 'chai'; import { CancellationTokenSource, NotebookCellOutputItem, NotebookDocument } from 'vscode'; import { traceInfo } from '../../platform/logging'; import { IDisposable } from '../../platform/common/types'; -import { - captureScreenShot, - createEventHandler, - initialize, - startJupyterServer, - suiteMandatory, - testMandatory, - waitForCondition -} from '../../test/common'; +import { captureScreenShot, initialize, startJupyterServer, suiteMandatory, testMandatory } from '../../test/common'; import { closeNotebooksAndCleanUpAfterTests, createEmptyPythonNotebook, @@ -94,7 +86,7 @@ suiteMandatory('Kernel API Tests @python', function () { if (!kernel) { throw new Error('Kernel not found'); } - const statusChange = createEventHandler(kernel, 'onDidChangeStatus', disposables); + // const statusChange = createEventHandler(kernel, 'onDidChangeStatus', disposables); // Verify we can execute code using the kernel. traceInfo(`Execute code silently`); @@ -102,15 +94,15 @@ suiteMandatory('Kernel API Tests @python', function () { const token = new CancellationTokenSource(); await waitForOutput(kernel.executeCode('print(1234)', token.token), '1234', expectedMime); traceInfo(`Execute code silently completed`); - // Wait for kernel to be idle. - await waitForCondition( - () => kernel.status === 'idle', - 5_000, - `Kernel did not become idle, current status is ${kernel.status}` - ); + // // Wait for kernel to be idle. + // await waitForCondition( + // () => kernel.status === 'idle', + // 5_000, + // `Kernel did not become idle, current status is ${kernel.status}` + // ); - // Verify state transition. - assert.deepEqual(Array.from(new Set(statusChange.all)), ['busy', 'idle'], 'States are incorrect'); + // // Verify state transition. + // assert.deepEqual(Array.from(new Set(statusChange.all)), ['busy', 'idle'], 'States are incorrect'); // Verify we can execute code using the kernel in parallel. await Promise.all([ @@ -119,12 +111,12 @@ suiteMandatory('Kernel API Tests @python', function () { waitForOutput(kernel.executeCode('print(3)', token.token), '3', expectedMime) ]); - // Wait for kernel to be idle. - await waitForCondition( - () => kernel.status === 'idle', - 5_000, - `Kernel did not become idle, current status is ${kernel.status}` - ); + // // Wait for kernel to be idle. + // await waitForCondition( + // () => kernel.status === 'idle', + // 5_000, + // `Kernel did not become idle, current status is ${kernel.status}` + // ); }); async function waitForOutput(executionResult: ExecutionResult, expectedOutput: string, expectedMimetype: string) { diff --git a/src/kernels/api/kernel.ts b/src/kernels/api/kernel.ts index b2b40e7d0a4..ffc5e410257 100644 --- a/src/kernels/api/kernel.ts +++ b/src/kernels/api/kernel.ts @@ -100,13 +100,13 @@ class KernelExecutionProgressIndicator { */ class WrappedKernelPerExtension implements Kernel { get status(): 'unknown' | 'starting' | 'idle' | 'busy' | 'terminating' | 'restarting' | 'autorestarting' | 'dead' { - sendApiTelemetry(this.extensionId, this.kernel, 'status', this.execution.executionCount).catch(noop); + // sendApiTelemetry(this.extensionId, this.kernel, 'status', this.execution.executionCount).catch(noop); return this.kernel.status; } get onDidChangeStatus(): Event< 'unknown' | 'starting' | 'idle' | 'busy' | 'terminating' | 'restarting' | 'autorestarting' | 'dead' > { - sendApiTelemetry(this.extensionId, this.kernel, 'onDidChangeStatus', this.execution.executionCount).catch(noop); + // sendApiTelemetry(this.extensionId, this.kernel, 'onDidChangeStatus', this.execution.executionCount).catch(noop); return this.kernel.onStatusChanged; }