From 1666cf0845e5423a7390e5d709c3cd9451f4101e Mon Sep 17 00:00:00 2001 From: Mark Pollack Date: Thu, 9 Nov 2023 15:18:47 -0500 Subject: [PATCH] Allow for up to 3 retries when running an integration test --- .github/workflows/continuous-integration.yml | 2 +- README.md | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 0e9e3120d..14ae68096 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -25,7 +25,7 @@ jobs: SPRING_AI_OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }} ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }} - run: mvn -s settings.xml -Pintegration-tests --batch-mode --update-snapshots deploy + run: mvn -s settings.xml -Pintegration-tests -Dfailsafe.rerunFailingTestsCount=3 --batch-mode --update-snapshots deploy - name: Generate Java docs run: mvn javadoc:aggregate diff --git a/README.md b/README.md index 24b9e54bb..14e8fe3cc 100644 --- a/README.md +++ b/README.md @@ -216,6 +216,11 @@ Set API key environment variables for OpenAI and Azure OpenAI before running. ./mvnw clean verify -Pintegration-tests ``` +To run a specific integration test allowing for up to two attempts to succeed. This is useful when a hosted service is not reliable or times out. +```shell +./mvnw -pl vector-stores/spring-ai-pgvector-store -Pintegration-tests -Dfailsafe.rerunFailingTestsCount=2 -Dit.test=PgVectorStoreIT verify + +``` To build the docs ```shell ./mvnw -pl spring-ai-docs antora