Skip to content

Commit

Permalink
slimmed down the client wrapper to just include just what we need
Browse files Browse the repository at this point in the history
  • Loading branch information
amunger committed Apr 20, 2022
1 parent 1d752a8 commit 5bccba2
Show file tree
Hide file tree
Showing 6 changed files with 89 additions and 584 deletions.
2 changes: 1 addition & 1 deletion src/test/datascience/interactiveWindow.vscode.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ suite('Interactive window', async function () {
sinon.restore();
await closeNotebooksAndCleanUpAfterTests(disposables);
});

test('Execute cell from Python file', async () => {
const source = 'print(42)';
const { activeInteractiveWindow } = await submitFromPythonFile(interactiveWindowProvider, source, disposables);
Expand Down
11 changes: 6 additions & 5 deletions src/test/testHooks.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Context } from 'mocha';
import { AppinsightsKey, JVSC_EXTENSION_ID, Telemetry } from '../platform/common/constants';
import { JVSC_EXTENSION_ID, Telemetry } from '../platform/common/constants';
import { IS_CI_SERVER } from './ciConstants.node';
import { extensions } from 'vscode';
import { sleep } from './core';
Expand All @@ -8,13 +8,14 @@ import { CiTelemetryReporter } from './utils/ciTelemetry/ciTelemetryReporter.nod
let telemetryReporter: CiTelemetryReporter | undefined;

export const rootHooks = {
beforeAll() {
beforeAll: async function () {
if (!IS_CI_SERVER) {
return;
}

const extensionVersion = extensions.getExtension(JVSC_EXTENSION_ID)?.packageJSON.version;
telemetryReporter = new CiTelemetryReporter(JVSC_EXTENSION_ID, extensionVersion, AppinsightsKey, true);
telemetryReporter = new CiTelemetryReporter(JVSC_EXTENSION_ID, extensionVersion);
await telemetryReporter.initialize();
},
afterEach(this: Context) {
if (!IS_CI_SERVER) {
Expand All @@ -25,7 +26,7 @@ export const rootHooks = {
if (this.currentTest?.title) {
const duration = this.currentTest?.duration;
const measures = typeof duration === 'number' ? { duration: duration } : duration ? duration : undefined;
telemetryReporter?.sendRawTelemetryEvent(
telemetryReporter?.sendTelemetryEvent(
Telemetry.RunTest,
{
testName: this.currentTest?.title,
Expand All @@ -40,7 +41,7 @@ export const rootHooks = {
return;
}

await telemetryReporter?.dispose();
await telemetryReporter?.flush();
// allow some time for the telemetry to flush
await sleep(2000);
}
Expand Down
98 changes: 0 additions & 98 deletions src/test/utils/ciTelemetry/TelemetryAppender.ts

This file was deleted.

86 changes: 0 additions & 86 deletions src/test/utils/ciTelemetry/appInsightsClientFactory.node.ts

This file was deleted.

Loading

0 comments on commit 5bccba2

Please sign in to comment.