Skip to content

Commit 38ea842

Browse files
whqtkerclaude
andauthored
chore: 게시글 조회수 동시성 테스트 반복 실행 워크플로우 추가 (#811)
수동 트리거로 PostViewCountConcurrencyTest를 50회 반복 실행해 플레이키니스를 검증할 수 있도록 한다. Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
1 parent ac51829 commit 38ea842

1 file changed

Lines changed: 55 additions & 0 deletions

File tree

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Post View Count Concurrency Test (x50)
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
repeat-test:
8+
runs-on: ubuntu-latest
9+
permissions:
10+
contents: read
11+
checks: write
12+
13+
steps:
14+
- name: Checkout master
15+
uses: actions/checkout@v4
16+
with:
17+
ref: master
18+
19+
- name: Set up JDK 21
20+
uses: actions/setup-java@v4
21+
with:
22+
java-version: '21'
23+
distribution: 'temurin'
24+
25+
- name: Setup Gradle
26+
uses: gradle/actions/setup-gradle@v4
27+
28+
- name: Make Gradle wrapper executable
29+
run: chmod +x ./gradlew
30+
31+
- name: Run test 50 times
32+
run: |
33+
set +e
34+
FAIL_COUNT=0
35+
for i in $(seq 1 50); do
36+
echo "=== Run $i/50 ==="
37+
./gradlew test --tests "com.example.solidconnection.concurrency.PostViewCountConcurrencyTest.게시글을_조회할_때_조회수_동시성_문제를_해결한다" --rerun-tasks
38+
STATUS=$?
39+
mkdir -p build/repeat-test-results/run-$i
40+
cp -r build/test-results/test/. build/repeat-test-results/run-$i/ 2>/dev/null || true
41+
if [ $STATUS -ne 0 ]; then
42+
FAIL_COUNT=$((FAIL_COUNT + 1))
43+
echo "Run $i FAILED"
44+
fi
45+
done
46+
echo "Total failures: $FAIL_COUNT / 50"
47+
if [ $FAIL_COUNT -ne 0 ]; then
48+
exit 1
49+
fi
50+
51+
- name: Publish Test Report
52+
uses: mikepenz/action-junit-report@v5
53+
if: success() || failure()
54+
with:
55+
report_paths: 'build/repeat-test-results/**/TEST-*.xml'

0 commit comments

Comments
 (0)