Restore the explicit closes on solr clients in test to prevent resource starvation #13831
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Solr Tests | |
| on: | |
| pull_request: | |
| branches: | |
| - '*' | |
| jobs: | |
| test: | |
| name: Run Solr Tests using Crave.io resources | |
| runs-on: self-hosted | |
| timeout-minutes: 40 | |
| steps: | |
| - name: Destroy previous clone | |
| run: crave clone destroy -y /crave-devspaces/pipeline/runs/${GITHUB_RUN_ID}_${GITHUB_RUN_NUMBER} || echo "Clone did not exist" | |
| continue-on-error: true | |
| - name: Crave clone sources | |
| run: crave clone create --projectID 39 /crave-devspaces/pipeline/runs/${GITHUB_RUN_ID}_${GITHUB_RUN_NUMBER} | |
| - name: Checkout the correct branch | |
| run: | | |
| git -C /crave-devspaces/pipeline/runs/${GITHUB_RUN_ID}_${GITHUB_RUN_NUMBER} fetch origin ${GITHUB_REF}:${GITHUB_REF} | |
| git -C /crave-devspaces/pipeline/runs/${GITHUB_RUN_ID}_${GITHUB_RUN_NUMBER} checkout ${GITHUB_REF} | |
| - name: Initialize, build, test | |
| run: | | |
| cd /crave-devspaces/pipeline/runs/${GITHUB_RUN_ID}_${GITHUB_RUN_NUMBER} | |
| crave run --clean --message "PR: ${GITHUB_REF_NAME}" -- ./gradlew --console=plain test | |
| - name: Cleanup | |
| if: ${{ always() }} | |
| run: | | |
| pushd /crave-devspaces/pipeline/runs/${GITHUB_RUN_ID}_${GITHUB_RUN_NUMBER} | |
| crave stop --all | |
| popd | |
| crave clone destroy -y /crave-devspaces/pipeline/runs/${GITHUB_RUN_ID}_${GITHUB_RUN_NUMBER} |