File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 2525
2626$userAgent = " QuickPerfTestBuildTask"
2727
28+ $global :RestTimeout = 60
29+
2830function InitializeRestHeaders ()
2931{
3032 $restHeaders = New-Object - TypeName " System.Collections.Generic.Dictionary[[String], [String]]"
@@ -72,7 +74,7 @@ function CreateTestDrop($headers, $dropJson)
7274function GetTestDrop ($headers , $drop )
7375{
7476 $uri = [String ]::Format(" {0}/_apis/clt/testdrops/{1}?api-version=1.0" , $CltAccountUrl , $drop.id )
75- $testdrop = Invoke-RestMethod - ContentType " application/json" - UserAgent $userAgent - Uri $uri - Headers $headers
77+ $testdrop = Invoke-RestMethod - ContentType " application/json" - UserAgent $userAgent - TimeoutSec $ global :RestTimeout - Uri $uri - Headers $headers
7678
7779 return $testdrop
7880}
@@ -89,7 +91,7 @@ function UploadTestDrop($testdrop)
8991function GetTestRuns ($headers )
9092{
9193 $uri = [String ]::Format(" {0}/_apis/clt/testruns?api-version=1.0" , $CltAccountUrl )
92- $runs = Invoke-RestMethod - ContentType " application/json" - UserAgent $userAgent - Uri $uri - Headers $headers
94+ $runs = Invoke-RestMethod - ContentType " application/json" - UserAgent $userAgent - TimeoutSec $ global :RestTimeout - Uri $uri - Headers $headers
9395
9496 return $runs
9597}
You can’t perform that action at this time.
0 commit comments