From d56dec57aabdede52961a050fae589e10da226d9 Mon Sep 17 00:00:00 2001 From: Matt Seddon <37993418+mattseddon@users.noreply.github.com> Date: Wed, 15 Mar 2023 08:42:01 +1100 Subject: [PATCH] Remove flaky telemetry event checks (#3461) Co-authored-by: Stephanie Roy --- extension/src/test/suite/extension.test.ts | 40 +--------------------- 1 file changed, 1 insertion(+), 39 deletions(-) diff --git a/extension/src/test/suite/extension.test.ts b/extension/src/test/suite/extension.test.ts index e492688aad..57462a6a3f 100644 --- a/extension/src/test/suite/extension.test.ts +++ b/extension/src/test/suite/extension.test.ts @@ -1,7 +1,7 @@ import { join, resolve } from 'path' import { afterEach, beforeEach, describe, it, suite } from 'mocha' import { expect } from 'chai' -import { stub, restore, spy, match } from 'sinon' +import { stub, restore, spy } from 'sinon' import { commands, workspace } from 'vscode' import { closeAllEditors, mockDisposable, mockDuration } from './util' import { mockHasCheckpoints } from './experiments/util' @@ -188,31 +188,6 @@ suite('Extension Test Suite', () => { expect(mockPlotsDiff, 'should have updated the plots data').to.have.been .called - expect( - mockSendTelemetryEvent, - 'should send the correct event details' - ).to.be.calledWithExactly( - EventName.EXTENSION_EXECUTION_DETAILS_CHANGED, - { - cliAccessible: true, - deps: 8, - dvcPathUsed: false, - dvcRootCount: 1, - hasCheckpoints: 1, - images: 3, - metrics: 4, - msPythonInstalled: true, - msPythonUsed: false, - noCheckpoints: 0, - params: 9, - pythonPathUsed: true, - templates: 3, - tracked: 13, - workspaceFolderCount: 1 - }, - match.has('duration') - ) - expect( mockDisposer, 'should dispose of the current repositories and experiments before creating new ones' @@ -248,7 +223,6 @@ suite('Extension Test Suite', () => { const otherRoot = resolve('other', 'root') mockDuration(duration) - const mockSendTelemetryEvent = stub(Telemetry, 'sendTelemetryEvent') const mockQueueStop = stub(DvcExecutor.prototype, 'queueStop').resolves( undefined ) @@ -256,18 +230,6 @@ suite('Extension Test Suite', () => { stub(Setup.prototype, 'getRoots').returns([dvcDemoPath, otherRoot]) await commands.executeCommand(RegisteredCommands.STOP_EXPERIMENTS) - - expect(mockSendTelemetryEvent).to.be.calledWith( - RegisteredCommands.STOP_EXPERIMENTS, - { - stopped: false, - wasRunning: false - }, - { - duration - } - ) - expect(mockQueueStop).to.be.calledWith(dvcDemoPath, Flag.KILL) expect(mockQueueStop).to.be.calledWith(otherRoot, Flag.KILL) })