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

@@ -151,8 +151,12 @@ class TestQueryContext(SupersetTestCase):
description_original = datasource.description
datasource.description = "temporary description"
db.session.commit()
# wait a second since mysql records timestamps in second granularity
time.sleep(1)
datasource.description = description_original
db.session.commit()
# wait another second because why not
time.sleep(1)
# create new QueryContext with unchanged attributes, extract new query_cache_key
query_context = ChartDataQueryContextSchema().load(payload)