Skip to content

🧪 Stabilize several flaky tests - #7469

Draft
agoscinski wants to merge 1 commit into
aiidateam:mainfrom
agoscinski:test/flaky-get-info
Draft

🧪 Stabilize several flaky tests#7469
agoscinski wants to merge 1 commit into
aiidateam:mainfrom
agoscinski:test/flaky-get-info

Conversation

@agoscinski

Copy link
Copy Markdown
Collaborator

Reset the profile before test_get_info so the node creation timestamps are not affected by data created in earlier tests.

This avoids flaky assertions on the first and last created node reported by the storage backend.

@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The test_get_info backend test now uses the aiida_profile_clean fixture through a pytest marker.

Changes

Backend test fixture

Layer / File(s) Summary
Apply clean profile fixture
tests/storage/psql_dos/test_backend.py
Adds the aiida_profile_clean fixture marker to test_get_info.

Estimated code review effort: 1 (Trivial) | ~2 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title is related to the change, though it overstates the scope by saying several tests instead of one.
Description check ✅ Passed The description matches the change by explaining the profile reset and the flaky timestamp assertions it fixes.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Jul 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.54%. Comparing base (1242b6f) to head (92baa99).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7469      +/-   ##
==========================================
- Coverage   80.61%   80.54%   -0.06%     
==========================================
  Files         580      580              
  Lines       46757    46757              
==========================================
- Hits        37689    37657      -32     
- Misses       9068     9100      +32     

☔ 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.

Reset the profile before `test_get_info` so the node creation
timestamps are not affected by data created in earlier tests.

This avoids flaky assertions on the first and last created node
reported by the storage backend.
@agoscinski
agoscinski force-pushed the test/flaky-get-info branch from 8c12de9 to 92baa99 Compare July 21, 2026 08:02
@agoscinski

Copy link
Copy Markdown
Collaborator Author

Flaky test

  FAILED tests/engine/processes/calcjobs/test_calc_job.py::test_monitor_result_action_disable_self - assert 0 == 1
   +  where 0 = len([])
  = 1 failed, 3810 passed, 51 skipped, 1 xfailed, 354 warnings in 1086.15s (0:18:06) =

@agoscinski agoscinski changed the title 🧪 Stabilize psql_dos get_info test 🧪 Stabilize several flaky tests Jul 21, 2026
@agoscinski
agoscinski marked this pull request as draft July 21, 2026 09:22
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