2
2
import { Tests , TestStatus , TestsToRun , CANCELLATION_REASON } from './contracts' ;
3
3
import * as vscode from 'vscode' ;
4
4
import { resetTestResults , displayTestErrorMessage , storeDiscoveredTests } from './testUtils' ;
5
- import * as telemetryHelper from '../../common/telemetry' ;
6
- import * as telemetryContracts from '../../common/telemetryContracts' ;
7
5
import { Installer , Product } from '../../common/installer' ;
8
6
import { isNotInstalledError } from '../../common/helpers' ;
9
7
@@ -62,7 +60,6 @@ export abstract class BaseTestManager {
62
60
this . _status = TestStatus . Idle ;
63
61
return Promise . resolve ( this . tests ) ;
64
62
}
65
- let delays = new telemetryHelper . Delays ( ) ;
66
63
this . _status = TestStatus . Discovering ;
67
64
68
65
this . createCancellationToken ( ) ;
@@ -90,11 +87,6 @@ export abstract class BaseTestManager {
90
87
storeDiscoveredTests ( tests ) ;
91
88
this . disposeCancellationToken ( ) ;
92
89
93
- delays . stop ( ) ;
94
- telemetryHelper . sendTelemetryEvent ( telemetryContracts . UnitTests . Discover , {
95
- Test_Provider : this . testProvider
96
- } , delays . toMeasures ( ) ) ;
97
-
98
90
return tests ;
99
91
} ) . catch ( reason => {
100
92
if ( isNotInstalledError ( reason ) && ! quietMode ) {
@@ -114,12 +106,6 @@ export abstract class BaseTestManager {
114
106
}
115
107
storeDiscoveredTests ( null ) ;
116
108
this . disposeCancellationToken ( ) ;
117
-
118
- delays . stop ( ) ;
119
- telemetryHelper . sendTelemetryEvent ( telemetryContracts . UnitTests . Discover , {
120
- Test_Provider : this . testProvider
121
- } , delays . toMeasures ( ) ) ;
122
-
123
109
return Promise . reject ( reason ) ;
124
110
} ) ;
125
111
}
@@ -157,8 +143,6 @@ export abstract class BaseTestManager {
157
143
this . resetTestResults ( ) ;
158
144
}
159
145
160
- let delays = new telemetryHelper . Delays ( ) ;
161
-
162
146
this . _status = TestStatus . Running ;
163
147
this . createCancellationToken ( ) ;
164
148
// If running failed tests, then don't clear the previously build UnitTests
@@ -181,8 +165,6 @@ export abstract class BaseTestManager {
181
165
} ) . then ( ( ) => {
182
166
this . _status = TestStatus . Idle ;
183
167
this . disposeCancellationToken ( ) ;
184
- delays . stop ( ) ;
185
- telemetryHelper . sendTelemetryEvent ( telemetryContracts . UnitTests . Run , moreInfo as any , delays . toMeasures ( ) ) ;
186
168
return this . tests ;
187
169
} ) . catch ( reason => {
188
170
if ( this . cancellationToken && this . cancellationToken . isCancellationRequested ) {
@@ -193,8 +175,6 @@ export abstract class BaseTestManager {
193
175
this . _status = TestStatus . Error ;
194
176
}
195
177
this . disposeCancellationToken ( ) ;
196
- delays . stop ( ) ;
197
- telemetryHelper . sendTelemetryEvent ( telemetryContracts . UnitTests . Run , moreInfo as any , delays . toMeasures ( ) ) ;
198
178
return Promise . reject ( reason ) ;
199
179
} ) ;
200
180
}
0 commit comments