Skip to content

Commit 32b8f12

Browse files
author
Michael Vasseur
committed
Test with different SQL isolation levels
To detect potential race conditions it's good to try to restructure the queries to fit in a higher level. Some companies/universities might run with this setting.
1 parent b98b1d9 commit 32b8f12

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

.github/workflows/integration.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ jobs:
1111
integration:
1212
runs-on: ubuntu-24.04
1313
timeout-minutes: 20
14+
strategy:
15+
matrix:
16+
SQL_ISOLATION: ['REPEATABLE-READ', 'SERIALIZABLE']
1417
container:
1518
image: domjudge/gitlabci:24.04
1619
options: --privileged --cgroupns=host --init
@@ -39,6 +42,8 @@ jobs:
3942
run: pstree -p
4043
- name: Install DOMjudge
4144
run: .github/jobs/baseinstall.sh all
45+
- name: Set SQL isolation
46+
run: echo "SET GLOBAL transaction_isolation=${{ matrix.SQL_ISOLATION }};" mysql -uroot -proot -hsqlserver
4247
- name: Set up chroot
4348
run: sudo misc-tools/dj_make_chroot -a amd64
4449
- name: Check nginx
@@ -81,13 +86,13 @@ jobs:
8186
if: ${{ !cancelled() }}
8287
uses: actions/upload-artifact@v4
8388
with:
84-
name: DB-dump
89+
name: DB-dump-${{ matrix.SQL_ISOLATION }}
8590
path: /tmp/db.sql
8691
- name: Upload all logs/artifacts
8792
if: ${{ !cancelled() }}
8893
uses: actions/upload-artifact@v4
8994
with:
90-
name: Logs
95+
name: Logs-${{ matrix.SQL_ISOLATION }}
9196
path: |
9297
/var/log/nginx
9398
/opt/domjudge/domserver/webapp/var/log/*.log

0 commit comments

Comments
 (0)