From 1b1317f58a11a7bfa2533a766c37b6836b7aaf98 Mon Sep 17 00:00:00 2001 From: Alena Khineika Date: Wed, 23 Aug 2023 11:52:36 +0200 Subject: [PATCH] fix: disable saved Connections Loaded event --- src/connectionController.ts | 6 ++++-- src/test/suite/connectionController.test.ts | 2 +- src/test/suite/telemetry/telemetryService.test.ts | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/connectionController.ts b/src/connectionController.ts index d3d573445..2bf08007c 100644 --- a/src/connectionController.ts +++ b/src/connectionController.ts @@ -222,7 +222,9 @@ export default class ConnectionController { this.eventEmitter.emit(DataServiceEventTypes.CONNECTIONS_DID_CHANGE); } - this._telemetryService.trackSavedConnectionsLoaded({ + // TODO: re-enable with fewer 'Saved Connections Loaded' events + // https://jira.mongodb.org/browse/VSCODE-462 + /* this._telemetryService.trackSavedConnectionsLoaded({ saved_connections: globalAndWorkspaceConnections.length, loaded_connections: loadedConnections.length, connections_with_secrets_in_keytar: loadedConnections.filter( @@ -234,7 +236,7 @@ export default class ConnectionController { connection.secretStorageLocation === SecretStorageLocation.SecretStorage ).length, - }); + }); */ if (connectionsThatDidNotMigrate.length) { log.error( diff --git a/src/test/suite/connectionController.test.ts b/src/test/suite/connectionController.test.ts index 8be9936e5..3c73217a9 100644 --- a/src/test/suite/connectionController.test.ts +++ b/src/test/suite/connectionController.test.ts @@ -1762,7 +1762,7 @@ suite('Connection Controller Test Suite', function () { assert.strictEqual(trackStub.notCalled, true); }); - test('should track SAVED_CONNECTIONS_LOADED event on load of saved connections', async () => { + test.skip('should track SAVED_CONNECTIONS_LOADED event on load of saved connections', async () => { testSandbox.replace(testStorageController, 'get', (key, storage) => { if ( storage === StorageLocation.WORKSPACE || diff --git a/src/test/suite/telemetry/telemetryService.test.ts b/src/test/suite/telemetry/telemetryService.test.ts index 2cc6ecdd0..61d1d5934 100644 --- a/src/test/suite/telemetry/telemetryService.test.ts +++ b/src/test/suite/telemetry/telemetryService.test.ts @@ -717,7 +717,7 @@ suite('Telemetry Controller Test Suite', () => { }); }); - test('track saved connections loaded', () => { + test.skip('track saved connections loaded', () => { testTelemetryService.trackSavedConnectionsLoaded({ saved_connections: 3, loaded_connections: 3,