Skip to content

Commit

Permalink
Ensure no disposables leak (#209040)
Browse files Browse the repository at this point in the history
  • Loading branch information
lramos15 authored Mar 28, 2024
1 parent f62931d commit 9243c3d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
1 change: 0 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@
"src/vs/platform/opener/test/common/opener.test.ts",
"src/vs/platform/registry/test/common/platform.test.ts",
"src/vs/platform/remote/test/common/remoteHosts.test.ts",
"src/vs/platform/telemetry/test/browser/1dsAppender.test.ts",
"src/vs/platform/workspace/test/common/workspace.test.ts",
"src/vs/platform/workspaces/test/electron-main/workspaces.test.ts",
"src/vs/workbench/api/test/browser/mainThreadConfiguration.test.ts",
Expand Down
10 changes: 7 additions & 3 deletions src/vs/platform/telemetry/test/browser/1dsAppender.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*--------------------------------------------------------------------------------------------*/
import type { ITelemetryItem, ITelemetryUnloadState } from '@microsoft/1ds-core-js';
import * as assert from 'assert';
import { ensureNoDisposablesAreLeakedInTestSuite } from 'vs/base/test/common/utils';
import { OneDataSystemWebAppender } from 'vs/platform/telemetry/browser/1dsAppender';
import { IAppInsightsCore } from 'vs/platform/telemetry/common/1dsAppender';

Expand All @@ -28,14 +29,17 @@ suite('AIAdapter', () => {
const prefix = 'prefix';


teardown(() => {
adapter.flush();
});

ensureNoDisposablesAreLeakedInTestSuite();

setup(() => {
appInsightsMock = new AppInsightsCoreMock();
adapter = new OneDataSystemWebAppender(false, prefix, undefined!, () => appInsightsMock);
});

teardown(() => {
adapter.flush();
});

test('Simple event', () => {
adapter.log('testEvent');
Expand Down

0 comments on commit 9243c3d

Please sign in to comment.