Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix flaky ZNE factory + observable test #2602

Merged
merged 2 commits into from
Dec 13, 2024
Merged

Fix flaky ZNE factory + observable test #2602

merged 2 commits into from
Dec 13, 2024

Conversation

natestemen
Copy link
Member

Description

Replaces a test that would fail occasionally with a deterministic assertion based on mocking the BatchedFactory object. I did keep one assertion regarding the actual value, but I'm pretty sure it's also deterministic.

fixes #1896

cc @Shivansh20128 since you ran into this recently.

@natestemen natestemen self-assigned this Dec 13, 2024
Copy link

codecov bot commented Dec 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.73%. Comparing base (ccbb172) to head (52765b7).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2602   +/-   ##
=======================================
  Coverage   98.73%   98.73%           
=======================================
  Files          92       92           
  Lines        4176     4176           
=======================================
  Hits         4123     4123           
  Misses         53       53           

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

@@ -94,21 +94,23 @@ def executor(circuit) -> float:
def test_with_observable_batched_factory(executor):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you are not using the executor argument anywhere in the test, which means you are not using all the parameter values 🤔

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! That was left over from testing and never got changed back. Fixed in 52765b7.

Copy link
Contributor

@cosenal cosenal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@natestemen natestemen merged commit 1370ee9 into main Dec 13, 2024
18 checks passed
@natestemen natestemen deleted the nts-flaky-zne-test branch December 13, 2024 17:29
@purva-thakre purva-thakre modified the milestone: 0.42.0 Dec 13, 2024
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.

ZNE test failing non-deterministically
3 participants