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
committed by GitHub
parent fa1d5cc49d
commit 48bf72bfc4
2 changed files with 25 additions and 1 deletions

24
.vscode/launch.json vendored
View File

@@ -16,6 +16,7 @@
"request": "attach", "request": "attach",
"name": "Attach to Extension Host", "name": "Attach to Extension Host",
"port": 5870, "port": 5870,
"timeout": 30000,
"restart": true, "restart": true,
"outFiles": [ "outFiles": [
"${workspaceFolder}/out/**/*.js" "${workspaceFolder}/out/**/*.js"
@@ -186,6 +187,22 @@
"webRoot": "${workspaceFolder}", "webRoot": "${workspaceFolder}",
"timeout": 45000 "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": [ "compounds": [
{ {
@@ -202,6 +219,13 @@
"Run Extension Unit Tests" "Run Extension Unit Tests"
] ]
}, },
{
"name": "Debug Extension Integration Tests",
"configurations": [
"Attach to Extension Host",
"Run Extension Integration Tests"
]
},
{ {
"name": "Debug azuredatastudio Main and Renderer", "name": "Debug azuredatastudio Main and Renderer",
"configurations": [ "configurations": [

View File

@@ -33,6 +33,6 @@ export class NativeTelemetryOptOut extends AbstractTelemetryOptOut {
} }
protected getWindowCount(): Promise<number> { 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
} }
} }