Skip to content

Disable SQLite disk sync for test databases - #8748

Draft
Jens Hedegaard Nielsen (jenshnielsen) wants to merge 4 commits into
microsoft:mainfrom
jenshnielsen:test-sqlite-synchronous-off
Draft

Jens Hedegaard Nielsen (jenshnielsen) wants to merge 4 commits into
microsoft:mainfrom
jenshnielsen:test-sqlite-synchronous-off

Conversation

@jenshnielsen

Copy link
Copy Markdown
Collaborator

Open every QCoDeS connection in the test suite with PRAGMA synchronous=OFF. Test databases are thrown away, so flushing each commit to disk only costs time, which is particularly expensive on Windows.

@codecov

codecov Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.42%. Comparing base (091a8bd) to head (70b96f1).
⚠️ Report is 8 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8748   +/-   ##
=======================================
  Coverage   75.42%   75.42%           
=======================================
  Files         308      308           
  Lines       32734    32734           
=======================================
  Hits        24689    24689           
  Misses       8045     8045           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

temporarily_copied_DB and the station config file helpers now create their temporary directories inside the test's tmp_path instead of the system temp dir, so PYTEST_DEBUG_TEMPROOT and --basetemp relocate every temporary file the tests create.
pytest already gives each test a fresh tmp_path and cleans up old ones, so the helpers no longer wrap it in tempfile.TemporaryDirectory. The station config helpers become a single write_config_file function, since there is nothing left to clean up on exit.
Open every QCoDeS connection in the test suite with PRAGMA synchronous=OFF. Test databases are thrown away, so flushing each commit to disk only costs time, which is particularly expensive on Windows.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant