From 59023009d762858f3a18a40bfe6481616d183c6e Mon Sep 17 00:00:00 2001
From: yatinappsmith <84702014+yatinappsmith@users.noreply.github.com>
Date: Thu, 23 Nov 2023 16:44:57 +0530
Subject: [PATCH] ci: Add retry for JUnit failures in the CI workflow (#29048)
## Checklist:
#### Dev activity
- [X] My code follows the style guidelines of this project
- [X] I have performed a self-review of my own code
- [X] I have commented my code, particularly in hard-to-understand areas
- [X] I have made corresponding changes to the documentation
- [X] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [X] New and existing unit tests pass locally with my changes
- [ ] PR is being merged under a feature flag
#### QA activity:
- [ ] [Speedbreak
features](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#speedbreakers-)
have been covered
- [ ] Test plan covers all impacted features and [areas of
interest](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#areas-of-interest-)
- [ ] Test plan has been peer reviewed by project stakeholders and other
QA members
- [ ] Manually tested functionality on DP
- [ ] We had an implementation alignment call with stakeholders post QA
Round 2
- [ ] Cypress test cases have been added and approved by SDET/manual QA
- [ ] Added `Test Plan Approved` label after Cypress tests were reviewed
- [ ] Added `Test Plan Approved` label after JUnit tests were reviewed
---
.github/workflows/server-build.yml | 3 ++-
app/server/pom.xml | 1 +
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/server-build.yml b/.github/workflows/server-build.yml
index 12d14c5c67..6fc6537553 100644
--- a/.github/workflows/server-build.yml
+++ b/.github/workflows/server-build.yml
@@ -145,7 +145,8 @@ jobs:
mvn --batch-mode versions:set \
-DnewVersion=${{ steps.vars.outputs.version }} \
-DgenerateBackupPoms=false \
- -DprocessAllModules=true
+ -DprocessAllModules=true \
+ -Dsurefire.rerunFailingTestsCount=3 -Dsurefire.outputFile="./junit-report.xml"
./build.sh $args
# Restore the previous built bundle if present. If not push the newly built into the cache
diff --git a/app/server/pom.xml b/app/server/pom.xml
index ec8817d887..124b63cde3 100644
--- a/app/server/pom.xml
+++ b/app/server/pom.xml
@@ -78,6 +78,7 @@
maven-surefire-plugin
3.0.0-M5
+ true
--add-opens java.base/java.lang=ALL-UNNAMED
--add-opens java.base/java.time=ALL-UNNAMED