Skip to content

Commit f537fa6

Browse files
kabirclaude
andcommitted
ci: add temporary workflow to detect intermittent test failures
Runs testAgentToAgentLocalHandling and testNonBlockingWithMultipleMessages in a loop (100 iterations) across 9 parallel jobs (3 Java versions × 3 transports) to capture intermittent failures for analysis. Related to a2aproject#777 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent 3f877a7 commit f537fa6

1 file changed

Lines changed: 88 additions & 0 deletions

File tree

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
name: Test Intermittent Failures (Loop 100x)
2+
3+
on:
4+
push:
5+
branches:
6+
- fix-intermittent
7+
pull_request:
8+
workflow_dispatch:
9+
10+
jobs:
11+
test-loop:
12+
name: Test Loop (${{ matrix.transport }}, JDK ${{ matrix.java }})
13+
runs-on: ubuntu-latest
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
java: ['17', '21', '25']
18+
transport: ['rest', 'jsonrpc', 'grpc']
19+
20+
steps:
21+
- name: Checkout code
22+
uses: actions/checkout@v4
23+
24+
- name: Set up JDK ${{ matrix.java }}
25+
uses: actions/setup-java@v4
26+
with:
27+
java-version: ${{ matrix.java }}
28+
distribution: 'temurin'
29+
cache: 'maven'
30+
31+
- name: Build project (skip tests)
32+
run: mvn clean install -DskipTests -B -V
33+
34+
- name: Run intermittent tests in loop (100 iterations)
35+
run: |
36+
MODULE="reference/${{ matrix.transport }}"
37+
TEST_CLASS="QuarkusA2ARestJdkTest"
38+
39+
# Different test class names for different transports
40+
if [ "${{ matrix.transport }}" == "jsonrpc" ]; then
41+
TEST_CLASS="QuarkusA2AJSONRPCJdkTest"
42+
elif [ "${{ matrix.transport }}" == "grpc" ]; then
43+
TEST_CLASS="QuarkusA2AGrpcTest"
44+
fi
45+
46+
TESTS="${TEST_CLASS}#testAgentToAgentLocalHandling+testNonBlockingWithMultipleMessages"
47+
48+
echo "Module: ${MODULE}"
49+
echo "Test class: ${TEST_CLASS}"
50+
echo "Running tests: ${TESTS}"
51+
52+
for i in {1..100}; do
53+
echo "==================================================================="
54+
echo "Iteration $i/100"
55+
echo "==================================================================="
56+
57+
mvn test -pl "${MODULE}" -Dtest="${TESTS}" -B
58+
59+
if [ $? -ne 0 ]; then
60+
echo "❌ Test failed on iteration $i"
61+
exit 1
62+
fi
63+
64+
echo "✅ Iteration $i passed"
65+
done
66+
67+
echo "==================================================================="
68+
echo "✅ All 100 iterations passed!"
69+
echo "==================================================================="
70+
71+
- name: Upload surefire reports on failure
72+
if: failure()
73+
uses: actions/upload-artifact@v4
74+
with:
75+
name: surefire-reports-${{ matrix.transport }}-jdk${{ matrix.java }}
76+
path: reference/${{ matrix.transport }}/target/surefire-reports/
77+
retention-days: 7
78+
79+
- name: Upload build logs on failure
80+
if: failure()
81+
uses: actions/upload-artifact@v4
82+
with:
83+
name: build-logs-${{ matrix.transport }}-jdk${{ matrix.java }}
84+
path: |
85+
reference/${{ matrix.transport }}/target/*.log
86+
reference/${{ matrix.transport }}/target/quarkus.log
87+
retention-days: 7
88+
if-no-files-found: ignore

0 commit comments

Comments
 (0)