Skip to content

Commit 215b7d2

Browse files
committed
* Always stop Toxiproxy server
1 parent 6f0f8eb commit 215b7d2

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

.github/workflows/build-test.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ jobs:
6969
- name: Integration Tests
7070
timeout-minutes: 25
7171
run: |
72-
Start-Job -Verbose -ScriptBlock { & "${{ github.workspace }}\.ci\windows\toxiproxy\toxiproxy-server.exe" }; `
72+
Start-Job -Verbose -ScriptBlock { & "${{ github.workspace }}\.ci\windows\toxiproxy\toxiproxy-server.exe" | Out-File -LiteralPath $env:APPDATA\RabbitMQ\log\toxiproxy-log.txt }; `
7373
dotnet test `
7474
--environment 'RABBITMQ_LONG_RUNNING_TESTS=true' `
7575
--environment "RABBITMQ_RABBITMQCTL_PATH=${{ steps.install-start-rabbitmq.outputs.path }}" `
@@ -79,9 +79,8 @@ jobs:
7979
"${{ github.workspace }}\projects\Test\Integration\Integration.csproj" --no-restore --no-build --logger 'console;verbosity=detailed'
8080
- name: Check for errors in RabbitMQ logs
8181
run: ${{ github.workspace }}\.ci\windows\gha-log-check.ps1
82-
- name: Maybe collect Toxiproxy logs
83-
if: failure()
84-
run: Get-Job | Where-Object { $_.HasMoreData } | Receive-Job | Out-File -Append -LiteralPath $env:APPDATA\RabbitMQ\log\toxiproxy-log.txt
82+
- name: Stop Toxiproxy
83+
run: Get-Job | Stop-Job -Verbose -PassThru | Remove-Job -Verbose
8584
- name: Maybe upload RabbitMQ and Toxiproxy logs
8685
if: failure()
8786
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)