@@ -90,7 +90,19 @@ 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+  $isAllowedFileFormatUpdated = $true 
94+  for ($i=0 ; $i -le 10 -and $isAllowedFileFormatUpdated -eq $false ;i++){ 
95+  try{ 
96+  $isAllowedFileFormatUpdated = $true; 
97+  Invoke-RestMethod -Uri "http://localhost/reports/api/v1.0/ReportServerInfo/Model.UpdateSettings" -Method POST -UseDefaultCredentials -ContentType 'application/json' -Body $stringNewRequest 
98+  } 
99+  catch{ 
100+  $isAllowedFileFormatUpdated = $false 
101+  Start-Sleep -Seconds 1 
102+  } 
103+  } 
104+  if ($isAllowedFileFormatUpdated -eq $false) {throw (New-Object System.Exception("Failed to update the AllowedResourceExtensionsForUpload")) } 
105+ 
94106
95107 # Integration test section 
96108 # Activate verbose on Powershell 
0 commit comments