From 215b7d258d92eba40f7bb460255a7b94ca157f72 Mon Sep 17 00:00:00 2001 From: Luke Bakken Date: Wed, 11 Dec 2024 13:30:33 -0800 Subject: [PATCH] * Always stop Toxiproxy server --- .github/workflows/build-test.yaml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-test.yaml b/.github/workflows/build-test.yaml index a56593167..cf955baba 100644 --- a/.github/workflows/build-test.yaml +++ b/.github/workflows/build-test.yaml @@ -69,7 +69,7 @@ jobs: - name: Integration Tests timeout-minutes: 25 run: | - Start-Job -Verbose -ScriptBlock { & "${{ github.workspace }}\.ci\windows\toxiproxy\toxiproxy-server.exe" }; ` + Start-Job -Verbose -ScriptBlock { & "${{ github.workspace }}\.ci\windows\toxiproxy\toxiproxy-server.exe" | Out-File -LiteralPath $env:APPDATA\RabbitMQ\log\toxiproxy-log.txt }; ` dotnet test ` --environment 'RABBITMQ_LONG_RUNNING_TESTS=true' ` --environment "RABBITMQ_RABBITMQCTL_PATH=${{ steps.install-start-rabbitmq.outputs.path }}" ` @@ -79,9 +79,8 @@ jobs: "${{ github.workspace }}\projects\Test\Integration\Integration.csproj" --no-restore --no-build --logger 'console;verbosity=detailed' - name: Check for errors in RabbitMQ logs run: ${{ github.workspace }}\.ci\windows\gha-log-check.ps1 - - name: Maybe collect Toxiproxy logs - if: failure() - run: Get-Job | Where-Object { $_.HasMoreData } | Receive-Job | Out-File -Append -LiteralPath $env:APPDATA\RabbitMQ\log\toxiproxy-log.txt + - name: Stop Toxiproxy + run: Get-Job | Stop-Job -Verbose -PassThru | Remove-Job -Verbose - name: Maybe upload RabbitMQ and Toxiproxy logs if: failure() uses: actions/upload-artifact@v4