File tree Expand file tree Collapse file tree 2 files changed +21
-17
lines changed
src/test/resources/ci/scripts Expand file tree Collapse file tree 2 files changed +21
-17
lines changed Original file line number Diff line number Diff line change @@ -117,7 +117,12 @@ jobs:
117117 - name : ' Run UI integration tests'
118118 id : run_tests
119119 working-directory : ./liberty-tools-intellij
120- run : bash ./src/test/resources/ci/scripts/run.sh
120+ run : |
121+ bash ./src/test/resources/ci/scripts/run.sh
122+ rc="$?"
123+ if [[ "$rc" == "23" ]]; then
124+ bash ./src/test/resources/ci/scripts/run.sh
125+ fi
121126 - name : ' Archive Test logs and reports'
122127 if : ${{ failure() && steps.run_tests.conclusion == 'failure' }}
123128
Original file line number Diff line number Diff line change @@ -176,27 +176,26 @@ main() {
176176 exit 11
177177 fi
178178
179- # Retry the tests if they fail with a SocketTimeoutException up to three times
180- for retry in {1..3}; do
181- startIDE
182- # Run the tests
183- echo -e " \n$( ${currentTime[@]} ) : INFO: Running tests..."
184- set -o pipefail # using tee requires we use this setting to gather the rc of gradlew
185- ./gradlew test -PuseLocal=$USE_LOCAL_PLUGIN | tee " $currentLoc " /build/junit.out
186- testRC=$?
187- set +o pipefail # reset this option
188- grep -i " SocketTimeoutException" " $currentLoc " /build/junit.out
189- rc=$?
190- if [ " $rc " -ne 0 ]; then
191- # rc=1 means the exception string was not found
192- break
193- fi
194- done
179+ JUNIT_OUTPUT_TXT=" $currentLoc " /build/junit.out
180+ startIDE
181+ # Run the tests
182+ echo -e " \n$( ${currentTime[@]} ) : INFO: Running tests..."
183+ set -o pipefail # using tee requires we use this setting to gather the rc of gradlew
184+ ./gradlew test -PuseLocal=$USE_LOCAL_PLUGIN | tee " $JUNIT_OUTPUT_TXT "
185+ testRC=$?
186+ set +o pipefail # reset this option
195187
196188 # If there were any errors, gather some debug data before exiting.
197189 if [ " $testRC " -ne 0 ]; then
198190 echo -e " \n$( ${currentTime[@]} ) : ERROR: Failure while running tests. rc: ${$testRC } ."
199191 gatherDebugData " $currentLoc "
192+ grep -i " SocketTimeoutException" " $JUNIT_OUTPUT_TXT "
193+ rc=$?
194+ if [ " $rc " -eq 0 ]; then
195+ # rc=0 means the exception string *was* found
196+ # This exit code detected in build script
197+ exit 23
198+ fi
200199 exit -1
201200 fi
202201}
You can’t perform that action at this time.
0 commit comments