Skip to content

Commit

Permalink
Merge pull request #2029 from Microsoft/users/nigurr/FixTestAgentIssu…
Browse files Browse the repository at this point in the history
…e-m102

Restart the service instead of start always
  • Loading branch information
Nitin Gurram authored Jul 11, 2016
2 parents 6defac1 + 58310db commit 9b1f6bb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Tasks/DeployVisualStudioTestAgent/TestAgentConfiguration.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -773,7 +773,7 @@ function InvokeDTAExecHostExe([string] $Version, [System.Management.Automation.P
{
$session = CreateNewSession -MachineCredential $MachineCredential
# Make sure DTA Agent Execution Service starts first before invoking DTA Execution Host
Invoke-Command -Session $session -ErrorAction SilentlyContinue -ErrorVariable err -OutVariable out { Start-Service -Name "DTAAgentExecutionService" }
Invoke-Command -Session $session -ErrorAction SilentlyContinue -ErrorVariable err -OutVariable out { Restart-Service -Name "DTAAgentExecutionService" }
Write-Verbose -Message ("Error : {0} " -f ($err | out-string)) -Verbose
Write-Verbose -Message ("Output : {0} " -f ($out | out-string)) -Verbose

Expand Down Expand Up @@ -955,4 +955,4 @@ if ($ret -eq $false)
{
$returnCode = ConfigureTestAgent -TfsCollection $tfsCollectionUrl -AsServiceOrProcess $asServiceOrProcess -EnvironmentUrl $environmentUrl -MachineName $machineName -MachineUserCredential $machineCredential -DisableScreenSaver $disableScreenSaver -EnableAutoLogon $enableAutoLogon -PersonalAccessToken $PersonalAccessToken -Capabilities $capabilities -AgentUserCredential $agentCredential
return $returnCode;
}
}
4 changes: 2 additions & 2 deletions Tasks/DeployVisualStudioTestAgent/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"version": {
"Major": 1,
"Minor": 0,
"Patch": 33
"Patch": 34
},
"demands": [

Expand Down Expand Up @@ -171,4 +171,4 @@
"workingDirectory": "$(currentDirectory)"
}
}
}
}
4 changes: 2 additions & 2 deletions Tasks/DeployVisualStudioTestAgent/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"version": {
"Major": 1,
"Minor": 0,
"Patch": 33
"Patch": 34
},
"demands": [],
"minimumAgentVersion": "1.101.0",
Expand Down Expand Up @@ -169,4 +169,4 @@
"workingDirectory": "$(currentDirectory)"
}
}
}
}

0 comments on commit 9b1f6bb

Please sign in to comment.