Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/vs/platform/assignment/common/assignmentService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export abstract class BaseAssignmentService implements IAssignmentService {
private overrideInitDelay: Promise<void>;

protected get experimentsEnabled(): boolean {
return true;
return !this.environmentService.disableExperiments;
}

constructor(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import { Registry } from '../../../../platform/registry/common/platform.js';
import { BaseAssignmentService } from '../../../../platform/assignment/common/assignmentService.js';
import { workbenchConfigurationNodeBase } from '../../../common/configuration.js';
import { IConfigurationRegistry, Extensions as ConfigurationExtensions, ConfigurationScope } from '../../../../platform/configuration/common/configurationRegistry.js';
import { IWorkbenchEnvironmentService } from '../../environment/common/environmentService.js';
import { IEnvironmentService } from '../../../../platform/environment/common/environment.js';

export const IWorkbenchAssignmentService = createDecorator<IWorkbenchAssignmentService>('WorkbenchAssignmentService');
Expand Down Expand Up @@ -86,7 +87,8 @@ export class WorkbenchAssignmentService extends BaseAssignmentService {
@IStorageService storageService: IStorageService,
@IConfigurationService configurationService: IConfigurationService,
@IProductService productService: IProductService,
@IEnvironmentService environmentService: IEnvironmentService
@IEnvironmentService environmentService: IEnvironmentService,
@IWorkbenchEnvironmentService private readonly workbenchEnvironmentService: IWorkbenchEnvironmentService
) {

super(
Expand All @@ -100,7 +102,10 @@ export class WorkbenchAssignmentService extends BaseAssignmentService {
}

protected override get experimentsEnabled(): boolean {
return !this.environmentService.disableExperiments && this.configurationService.getValue('workbench.enableExperiments') === true;
return !this.environmentService.disableExperiments &&
!this.environmentService.extensionTestsLocationURI &&
!this.workbenchEnvironmentService.enableSmokeTestDriver &&
this.configurationService.getValue('workbench.enableExperiments') === true;
}

override async getTreatment<T extends string | number | boolean>(name: string): Promise<T | undefined> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,12 @@ export class CoreExperimentationService extends Disposable implements ICoreExper
) {
super();

if (environmentService.disableExperiments) {
return; // explicitly disabled
if (
environmentService.disableExperiments ||
environmentService.enableSmokeTestDriver ||
environmentService.extensionTestsLocationURI
) {
return; //not applicable in this environment
}

this.initializeExperiments();
Expand Down
Loading