Skip to content

Commit

Permalink
fix paths
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmrdavid committed Oct 1, 2024
1 parent 7ec183f commit 9cc91bd
Showing 1 changed file with 26 additions and 28 deletions.
54 changes: 26 additions & 28 deletions test/SmokeTests/OOProcSmokeTests/DotNetIsolated/run-smoke-tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -15,34 +15,32 @@ try {
Invoke-RestMethod -Method Post -Uri "http://localhost:7071/admin/host/ping"
Write-Host "Host is healthy!" -ForegroundColor Green

if ($NoValidation -eq $false) {
# Note that any HTTP protocol errors (e.g. HTTP 4xx or 5xx) will cause an immediate failure
$startOrchestrationUri = "http://localhost:7071/$HttpStartPath"
Write-Host "Starting a new orchestration instance via POST to $startOrchestrationUri..." -ForegroundColor Yellow

$result = Invoke-RestMethod -Method Post -Uri $startOrchestrationUri
Write-Host "Started orchestration with instance ID '$($result.id)'!" -ForegroundColor Yellow
Write-Host "Waiting for orchestration to complete..." -ForegroundColor Yellow

$retryCount = 0
$success = $false
$statusUrl = $result.statusQueryGetUri

while ($retryCount -lt 15) {
$result = Invoke-RestMethod -Method Get -Uri $statusUrl
$runtimeStatus = $result.runtimeStatus
Write-Host "Orchestration is $runtimeStatus" -ForegroundColor Yellow

if ($result.runtimeStatus -eq "Completed") {
$success = $true
Write-Host $result
break
}

Start-Sleep -Seconds 1
$retryCount = $retryCount + 1
}
}
# Note that any HTTP protocol errors (e.g. HTTP 4xx or 5xx) will cause an immediate failure
$startOrchestrationUri = "http://localhost:7071/$HttpStartPath"
Write-Host "Starting a new orchestration instance via POST to $startOrchestrationUri..." -ForegroundColor Yellow

$result = Invoke-RestMethod -Method Post -Uri $startOrchestrationUri
Write-Host "Started orchestration with instance ID '$($result.id)'!" -ForegroundColor Yellow
Write-Host "Waiting for orchestration to complete..." -ForegroundColor Yellow

$retryCount = 0
$success = $false
$statusUrl = $result.statusQueryGetUri

while ($retryCount -lt 15) {
$result = Invoke-RestMethod -Method Get -Uri $statusUrl
$runtimeStatus = $result.runtimeStatus
Write-Host "Orchestration is $runtimeStatus" -ForegroundColor Yellow

if ($result.runtimeStatus -eq "Completed") {
$success = $true
Write-Host $result
break
}

Start-Sleep -Seconds 1
$retryCount = $retryCount + 1
}

if ($success -eq $false) {
throw "Orchestration didn't complete in time! :("
Expand Down

0 comments on commit 9cc91bd

Please sign in to comment.