Skip to content

Commit

Permalink
Test with different SQL isolation levels
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Michael Vasseur committed Nov 24, 2024
1 parent b98b1d9 commit 32b8f12
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ jobs:
integration:
runs-on: ubuntu-24.04
timeout-minutes: 20
strategy:
matrix:
SQL_ISOLATION: ['REPEATABLE-READ', 'SERIALIZABLE']
container:
image: domjudge/gitlabci:24.04
options: --privileged --cgroupns=host --init
Expand Down Expand Up @@ -39,6 +42,8 @@ jobs:
run: pstree -p
- name: Install DOMjudge
run: .github/jobs/baseinstall.sh all
- name: Set SQL isolation
run: echo "SET GLOBAL transaction_isolation=${{ matrix.SQL_ISOLATION }};" mysql -uroot -proot -hsqlserver
- name: Set up chroot
run: sudo misc-tools/dj_make_chroot -a amd64
- name: Check nginx
Expand Down Expand Up @@ -81,13 +86,13 @@ jobs:
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v4
with:
name: DB-dump
name: DB-dump-${{ matrix.SQL_ISOLATION }}
path: /tmp/db.sql
- name: Upload all logs/artifacts
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v4
with:
name: Logs
name: Logs-${{ matrix.SQL_ISOLATION }}
path: |
/var/log/nginx
/opt/domjudge/domserver/webapp/var/log/*.log
Expand Down

0 comments on commit 32b8f12

Please sign in to comment.