Skip to content

Commit 2d7573a

Browse files
committed
TEMPORARY COMMIT
This is a workflow to validate the fix by running intermittently failing tests in a loop.
1 parent 6fe7129 commit 2d7573a

1 file changed

Lines changed: 74 additions & 0 deletions

File tree

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

0 commit comments

Comments
 (0)