Skip to content

Commit 17fc1b1

Browse files
author
Nitin Gurram
authored
Merge pull request #2009 from Microsoft/users/nigurr/FixTestAgentAsProcess-m102
DTA Flow might fail if Test Agent is configured as Process
2 parents 1d3e000 + d106909 commit 17fc1b1

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

Tasks/DeployVisualStudioTestAgent/TestAgentConfiguration.ps1

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -772,6 +772,11 @@ function InvokeDTAExecHostExe([string] $Version, [System.Management.Automation.P
772772
Try
773773
{
774774
$session = CreateNewSession -MachineCredential $MachineCredential
775+
# Make sure DTA Agent Execution Service starts first before invoking DTA Execution Host
776+
Invoke-Command -Session $session -ErrorAction SilentlyContinue -ErrorVariable err -OutVariable out { Start-Service -Name "DTAAgentExecutionService" }
777+
Write-Verbose -Message ("Error : {0} " -f ($err | out-string)) -Verbose
778+
Write-Verbose -Message ("Output : {0} " -f ($out | out-string)) -Verbose
779+
775780
Invoke-Command -Session $session -ErrorAction SilentlyContinue -ErrorVariable err -OutVariable out -scriptBlock { schtasks.exe /create /TN:DTAConfig /TR:$args /F /RL:HIGHEST /SC:MONTHLY ; schtasks.exe /run /TN:DTAConfig ; Sleep 10 ; schtasks.exe /change /disable /TN:DTAConfig } -ArgumentList $exePath
776781
Write-Verbose -Message ("Error : {0} " -f ($err | out-string)) -Verbose
777782
Write-Verbose -Message ("Output : {0} " -f ($out | out-string)) -Verbose

Tasks/DeployVisualStudioTestAgent/task.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"version": {
1414
"Major": 1,
1515
"Minor": 0,
16-
"Patch": 32
16+
"Patch": 33
1717
},
1818
"demands": [
1919

Tasks/DeployVisualStudioTestAgent/task.loc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"version": {
1414
"Major": 1,
1515
"Minor": 0,
16-
"Patch": 32
16+
"Patch": 33
1717
},
1818
"demands": [],
1919
"minimumAgentVersion": "1.101.0",

0 commit comments

Comments
 (0)