Skip to content

Commit a393c77

Browse files
committed
loop
1 parent ccff67e commit a393c77

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

appveyor.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,16 @@ test_script:
9090
# Enable additional file formats
9191
$newSettings = New-Object PSCustomObject -Property @{"PropertyValues" = @( @{"@odata.type"="#Model.Property"; "Name" = "AllowedResourceExtensionsForUpload"; "Value" = "*,*.xml,*.xsd,*.xsl,*.png,*.gif,*.jpg,*.tif,*.jpeg,*.tiff,*.bmp,*.pdf,*.svg,*.rtf,*.txt,*.doc,*.docx,*.pps,*.ppt,*.pptx,*.xlsx"})}
9292
$stringNewRequest = $newSettings | ConvertTo-JSON -Depth 5
93-
try {Invoke-RestMethod -Uri "http://localhost/reports/api/v1.0/ReportServerInfo/Model.UpdateSettings" -Method POST -UseDefaultCredentials -ContentType 'application/json' -Body $stringNewRequest} catch {}
93+
for ($i=0 ; $i -le 10 -and $sucess -eq $false ;i++){
94+
try{
95+
$sucess = $true;
96+
Invoke-RestMethod -Uri "http://localhost/reports/api/v1.0/ReportServerInfo/Model.UpdateSettings" -Method POST -UseDefaultCredentials -ContentType 'application/json' -Body $stringNewRequest
97+
}
98+
catch (){
99+
$sucess = $false
100+
Start-Sleep -Seconds 1
101+
}
102+
}
94103
95104
# Integration test section
96105
# Activate verbose on Powershell

0 commit comments

Comments
 (0)