Skip to content

Commit 6f8f44d

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

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,9 @@ 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+
hanging_test_pid=$(jps | awk '$2 ~ /surefirebooter/ {print $1}')
117+
[ ! -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
116118
- uses: actions/upload-artifact@v4
117119
if: failure()
118120
with:
@@ -172,7 +174,9 @@ jobs:
172174
- name: Run Tests
173175
if: matrix.os != 'windows-latest'
174176
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)
177+
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"
178+
hanging_test_pid=$(jps | awk '$2 ~ /surefirebooter/ {print $1}')
179+
[ ! -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
176180
- uses: actions/upload-artifact@v4
177181
if: failure()
178182
with:

0 commit comments

Comments
 (0)