mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-07 09:35:41 -05:00
Merge from master
This commit is contained in:
@@ -3,8 +3,6 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
'use strict';
|
||||
|
||||
import 'vs/workbench/parts/search/electron-browser/search.contribution'; // load contributions
|
||||
import * as assert from 'assert';
|
||||
import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace';
|
||||
@@ -20,16 +18,18 @@ import { IQuickOpenRegistry, Extensions } from 'vs/workbench/browser/quickopen';
|
||||
import { Registry } from 'vs/platform/registry/common/platform';
|
||||
import { SearchService } from 'vs/workbench/services/search/node/searchService';
|
||||
import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection';
|
||||
import { TestEnvironmentService, TestContextService, TestEditorService, TestEditorGroupsService } from 'vs/workbench/test/workbenchTestServices';
|
||||
import { TestEnvironmentService, TestContextService, TestEditorService, TestEditorGroupsService, TestTextResourcePropertiesService } from 'vs/workbench/test/workbenchTestServices';
|
||||
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
|
||||
import { TPromise } from 'vs/base/common/winjs.base';
|
||||
import URI from 'vs/base/common/uri';
|
||||
import { URI } from 'vs/base/common/uri';
|
||||
import { InstantiationService } from 'vs/platform/instantiation/common/instantiationService';
|
||||
import { TestConfigurationService } from 'vs/platform/configuration/test/common/testConfigurationService';
|
||||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||
import { ModelServiceImpl } from 'vs/editor/common/services/modelServiceImpl';
|
||||
import { IModelService } from 'vs/editor/common/services/modelService';
|
||||
import { testWorkspace } from 'vs/platform/workspace/test/common/testWorkspace';
|
||||
import { CancellationToken } from 'vs/base/common/cancellation';
|
||||
import { ITextResourcePropertiesService } from 'vs/editor/common/services/resourceConfiguration';
|
||||
|
||||
namespace Timer {
|
||||
export interface ITimerEvent {
|
||||
@@ -68,10 +68,12 @@ suite.skip('QuickOpen performance (integration)', () => {
|
||||
|
||||
const telemetryService = new TestTelemetryService();
|
||||
const configurationService = new TestConfigurationService();
|
||||
const textResourcePropertiesService = new TestTextResourcePropertiesService(configurationService);
|
||||
const instantiationService = new InstantiationService(new ServiceCollection(
|
||||
[ITelemetryService, telemetryService],
|
||||
[IConfigurationService, configurationService],
|
||||
[IModelService, new ModelServiceImpl(null, configurationService)],
|
||||
[ITextResourcePropertiesService, textResourcePropertiesService],
|
||||
[IModelService, new ModelServiceImpl(null, configurationService, textResourcePropertiesService)],
|
||||
[IWorkspaceContextService, new TestContextService(testWorkspace(URI.file(testWorkspacePath)))],
|
||||
[IEditorService, new TestEditorService()],
|
||||
[IEditorGroupsService, new TestEditorGroupsService()],
|
||||
@@ -87,7 +89,7 @@ suite.skip('QuickOpen performance (integration)', () => {
|
||||
function measure() {
|
||||
const handler = descriptor.instantiate(instantiationService);
|
||||
handler.onOpen();
|
||||
return handler.getResults('a').then(result => {
|
||||
return handler.getResults('a', CancellationToken.None).then(result => {
|
||||
const uncachedEvent = popEvent();
|
||||
assert.strictEqual(uncachedEvent.data.symbols.fromCache, false, 'symbols.fromCache');
|
||||
assert.strictEqual(uncachedEvent.data.files.fromCache, true, 'files.fromCache');
|
||||
@@ -96,7 +98,7 @@ suite.skip('QuickOpen performance (integration)', () => {
|
||||
}
|
||||
return uncachedEvent;
|
||||
}).then(uncachedEvent => {
|
||||
return handler.getResults('ab').then(result => {
|
||||
return handler.getResults('ab', CancellationToken.None).then(result => {
|
||||
const cachedEvent = popEvent();
|
||||
assert.strictEqual(uncachedEvent.data.symbols.fromCache, false, 'symbols.fromCache');
|
||||
assert.ok(cachedEvent.data.files.fromCache, 'filesFromCache');
|
||||
|
||||
Reference in New Issue
Block a user