Fix TelemetryOptOut error and add debug targets for running extension integration tests (#7765)

This commit is contained in:
Charles Gagnon 2019-10-17 13:39:11 -07:00 коммит произвёл GitHub
Родитель fa1d5cc49d
Коммит 48bf72bfc4
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 25 добавлений и 1 удалений

24
.vscode/launch.json поставляемый
Просмотреть файл

@ -16,6 +16,7 @@
"request": "attach",
"name": "Attach to Extension Host",
"port": 5870,
"timeout": 30000,
"restart": true,
"outFiles": [
"${workspaceFolder}/out/**/*.js"
@ -186,6 +187,22 @@
"webRoot": "${workspaceFolder}",
"timeout": 45000
},
{
"type": "chrome",
"request": "launch",
"name": "Run Extension Integration Tests",
"windows": {
"runtimeExecutable": "${workspaceFolder}/scripts/sql-test-integration.bat"
},
"osx": {
"runtimeExecutable": "${workspaceFolder}/scripts/sql-test-integration.sh"
},
"linux": {
"runtimeExecutable": "${workspaceFolder}/scripts/sql-test-integration.sh"
},
"webRoot": "${workspaceFolder}",
"timeout": 45000
},
],
"compounds": [
{
@ -202,6 +219,13 @@
"Run Extension Unit Tests"
]
},
{
"name": "Debug Extension Integration Tests",
"configurations": [
"Attach to Extension Host",
"Run Extension Integration Tests"
]
},
{
"name": "Debug azuredatastudio Main and Renderer",
"configurations": [

Просмотреть файл

@ -33,6 +33,6 @@ export class NativeTelemetryOptOut extends AbstractTelemetryOptOut {
}
protected getWindowCount(): Promise<number> {
return this.electronService.getWindowCount();
return this.electronService ? this.electronService.getWindowCount() : Promise.resolve(0); // {{SQL CARBON EDIT}} Tests run without UI context so electronService is undefined in that case
}
}