Skip to content

Commit d2bf4ad

Browse files
committed
[UNDERTOW-2587] Fix the linux script
Signed-off-by: Flavia Rainone <frainone@redhat.com>
1 parent d0c7b57 commit d2bf4ad

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,10 @@ jobs:
112112
- name: Run Tests
113113
if: matrix.os != 'windows-latest'
114114
run: |
115-
timeout 5400s mvn -U -B -fae test -Pproxy '-DfailIfNoTests=false' -pl ${{ matrix.module }} || jstack -l $(jps | awk '$2 ~ /surefirebooter/ {print $1}') > thread-dump.txt && exit 1)
115+
timeout --foreground 180s sh -c 'mvn -U -B -fae test -Pproxy '-DfailIfNoTests=false' -pl ${{ matrix.module }};exit' || echo "Hanging test found, we will proceed with a thread dump"
116+
timeout_occurred=$?
117+
hanging_test_pid=$(jps | awk '$2 ~ /surefirebooter/ {print $1}')
118+
[ ! -z "$hanging_test_pid" ] && echo "Hanging test found. Pid is $hanging_test_pid" && jstack -l $(jps | awk '$2 ~ /surefirebooter/ {print $1}') | tee thread-dump.txt && exit 1 || echo "No hanging test found, tests ran successfully" && exit $timeout_occurred
116119
- uses: actions/upload-artifact@v4
117120
if: failure()
118121
with:
@@ -172,7 +175,10 @@ jobs:
172175
- name: Run Tests
173176
if: matrix.os != 'windows-latest'
174177
run: |
175-
timeout 5400s mvn -U -B -fae test ${{ matrix.proxy }} '-DfailIfNoTests=false' -pl ${{ matrix.module }} -Dtest.ipv6=true || jstack -l $(jps | awk '$2 ~ /surefirebooter/ {print $1}') > thread-dump.txt && exit 1)
178+
timeout --foreground 180s sh -c 'mvn -U -B -fae test ${{ matrix.proxy }} '-DfailIfNoTests=false' -pl ${{ matrix.module }} -Dtest.ipv6=true;exit' || echo "Hanging test found, we will proceed with a thread dump"
179+
timeout_occurred=$?
180+
hanging_test_pid=$(jps | awk '$2 ~ /surefirebooter/ {print $1}')
181+
[ ! -z "$hanging_test_pid" ] && echo "Hanging test found. Pid is $hanging_test_pid" && jstack -l $(jps | awk '$2 ~ /surefirebooter/ {print $1}') | tee thread-dump.txt && exit 1 || echo "No hanging test found, tests ran successfully" && exit $timeout_occurred
176182
- uses: actions/upload-artifact@v4
177183
if: failure()
178184
with:

0 commit comments

Comments
 (0)