Skip to content

Commit 350da1d

Browse files
authored
Remove experiments for refresh and failed tests buttons (#17894)
* Removing experiments for refresh and failed tests buttons * move news item to code health
1 parent b6c0d3e commit 350da1d

File tree

5 files changed

+6
-33
lines changed

5 files changed

+6
-33
lines changed

news/3 Code Health/17868.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Removing experiments for refresh and failed tests buttons.

package.json

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -506,8 +506,6 @@
506506
"pythonDeprecatePythonPath",
507507
"pythonSurveyNotification",
508508
"pythonTensorboardExperiment",
509-
"pythonRunFailedTestsButtonDisplayed",
510-
"pythonRefreshTestsButtonDisplayed",
511509
"pythonRememberDebugConfig"
512510
]
513511
},
@@ -523,8 +521,6 @@
523521
"pythonDeprecatePythonPath",
524522
"pythonSurveyNotification",
525523
"pythonTensorboardExperiment",
526-
"pythonRunFailedTestsButtonDisplayed",
527-
"pythonRefreshTestsButtonDisplayed",
528524
"pythonRememberDebugConfig"
529525
]
530526
},
@@ -1840,22 +1836,22 @@
18401836
"view/title": [
18411837
{
18421838
"command": "python.refreshTests",
1843-
"when": "view == workbench.view.testing && !refreshingTests && inShowRefreshingTestsExperiment && !virtualWorkspace && shellExecutionSupported",
1839+
"when": "view == workbench.view.testing && !refreshingTests && !virtualWorkspace && shellExecutionSupported",
18441840
"group": "navigation@0"
18451841
},
18461842
{
18471843
"command": "python.refreshingTests",
1848-
"when": "view == workbench.view.testing && refreshingTests && inShowRefreshingTestsExperiment && !virtualWorkspace && shellExecutionSupported",
1844+
"when": "view == workbench.view.testing && refreshingTests && !virtualWorkspace && shellExecutionSupported",
18491845
"group": "navigation@0"
18501846
},
18511847
{
18521848
"command": "python.stopRefreshingTests",
1853-
"when": "view == workbench.view.testing && refreshingTests && inShowRefreshingTestsExperiment && !virtualWorkspace && shellExecutionSupported",
1849+
"when": "view == workbench.view.testing && refreshingTests && !virtualWorkspace && shellExecutionSupported",
18541850
"group": "navigation@0"
18551851
},
18561852
{
18571853
"command": "testing.reRunFailTests",
1858-
"when": "view == workbench.view.testing && hasFailedTests && inShowRunFailedTestsExperiment && !virtualWorkspace && shellExecutionSupported",
1854+
"when": "view == workbench.view.testing && hasFailedTests && !virtualWorkspace && shellExecutionSupported",
18591855
"group": "navigation@1"
18601856
}
18611857
]

src/client/common/application/contextKeys.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,5 @@
33

44
export enum ExtensionContextKey {
55
HasFailedTests = 'hasFailedTests',
6-
InShowRunFailedTestsExperiment = 'inShowRunFailedTestsExperiment',
76
RefreshingTests = 'refreshingTests',
8-
InShowRefreshingTestsExperiment = 'inShowRefreshingTestsExperiment',
97
}

src/client/common/experiments/groups.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,6 @@ export enum TorchProfiler {
2929
experiment = 'PythonPyTorchProfiler',
3030
}
3131

32-
// Experiment to show the run failed tests button
33-
export enum ShowRunFailedTests {
34-
experiment = 'pythonRunFailedTestsButtonDisplayed',
35-
}
36-
37-
// Experiment to show the run failed tests button
38-
export enum ShowRefreshTests {
39-
experiment = 'pythonRefreshTestsButtonDisplayed',
40-
}
41-
4232
// Experiment to cache debug configuration
4333
export enum CacheDebugConfig {
4434
experiment = 'pythonRememberDebugConfig',

src/client/testing/main.ts

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { ConfigurationChangeEvent, Disposable, Uri, tests, TestResultState, Work
55
import { IApplicationShell, ICommandManager, IContextKeyManager, IWorkspaceService } from '../common/application/types';
66
import * as constants from '../common/constants';
77
import '../common/extensions';
8-
import { IDisposableRegistry, IExperimentService, Product } from '../common/types';
8+
import { IDisposableRegistry, Product } from '../common/types';
99
import { IInterpreterService } from '../interpreter/contracts';
1010
import { IServiceContainer } from '../ioc/types';
1111
import { EventName } from '../telemetry/constants';
@@ -18,7 +18,6 @@ import { IExtensionActivationService } from '../activation/types';
1818
import { ITestController } from './testController/common/types';
1919
import { traceVerbose } from '../common/logger';
2020
import { DelayedTrigger, IDelayedTrigger } from '../common/utils/delayTrigger';
21-
import { ShowRefreshTests, ShowRunFailedTests } from '../common/experiments/groups';
2221
import { ExtensionContextKey } from '../common/application/contextKeys';
2322
import { checkForFailedTests, updateTestResultMap } from './testController/common/testItemUtilities';
2423
import { Testing } from '../common/utils/localize';
@@ -112,17 +111,6 @@ export class UnitTestManagementService implements IExtensionActivationService {
112111
}
113112
});
114113
}
115-
116-
// Enable buttons based on experiment
117-
const experiments = this.serviceContainer.get<IExperimentService>(IExperimentService);
118-
await this.context.setContext(
119-
ExtensionContextKey.InShowRunFailedTestsExperiment,
120-
await experiments.inExperiment(ShowRunFailedTests.experiment),
121-
);
122-
await this.context.setContext(
123-
ExtensionContextKey.InShowRefreshingTestsExperiment,
124-
await experiments.inExperiment(ShowRefreshTests.experiment),
125-
);
126114
}
127115

128116
private async updateTestUIButtons() {

0 commit comments

Comments
 (0)