chore: stabilize MySQL tests by aligning isolation levels (#28028)

This commit is contained in:
Maxime Beauchemin
2024-04-15 15:49:09 -07:00
committed by GitHub
parent c225e17a75
commit de9daf7ad9
4 changed files with 16 additions and 0 deletions

View File

@@ -89,6 +89,8 @@ EOF
setup-mysql() {
say "::group::Initialize database"
mysql -h 127.0.0.1 -P 13306 -u root --password=root <<-EOF
SET GLOBAL transaction_isolation='READ-COMMITTED';
SET GLOBAL TRANSACTION ISOLATION LEVEL READ COMMITTED;
DROP DATABASE IF EXISTS superset;
CREATE DATABASE superset DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
DROP DATABASE IF EXISTS sqllab_test_db;

View File

@@ -29,6 +29,11 @@ jobs:
MYSQL_ROOT_PASSWORD: root
ports:
- 13306:3306
options: >-
--health-cmd="mysqladmin ping --silent"
--health-interval=10s
--health-timeout=5s
--health-retries=5
redis:
image: redis:7-alpine
options: --entrypoint redis-server