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 failing unit test #2685

Merged
merged 1 commit into from
Oct 14, 2024
Merged

Conversation

sjberman
Copy link
Contributor

Problem: Intermittently one of our unit tests was failing.

Solution: My hunch as to why it was failing is because of the parallel nature would occasionally cause an object to be in the wrong state for a specific test. So that object is now being defined for every test instead of globally.

Closes #2625

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that all unit tests pass after adding my changes
  • I have updated necessary documentation
  • I have rebased my branch onto main
  • I will ensure my PR is targeting the main branch and pulling from my branch from my own fork

Release notes

If this PR introduces a change that affects users and needs to be mentioned in the release notes,
please add a brief note that summarizes the change.


Problem: Intermittently one of our unit tests was failing.

Solution: My hunch as to why it was failing is because of the parallel nature would occasionally cause an object to be in the wrong state for a specific test. So that object is now being defined for every test instead of globally.
@sjberman sjberman requested a review from a team as a code owner October 14, 2024 17:17
@github-actions github-actions bot added the tests Pull requests that update tests label Oct 14, 2024
Copy link

codecov bot commented Oct 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.89%. Comparing base (3748661) to head (4764332).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2685   +/-   ##
=======================================
  Coverage   88.89%   88.89%           
=======================================
  Files         110      110           
  Lines        8556     8556           
  Branches       50       50           
=======================================
  Hits         7606     7606           
  Misses        892      892           
  Partials       58       58           

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

@bjee19
Copy link
Contributor

bjee19 commented Oct 14, 2024

Nice!

@sjberman sjberman merged commit 510c35a into nginxinc:main Oct 14, 2024
38 checks passed
@sjberman sjberman deleted the tests/unit-test-failure branch October 14, 2024 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Pull requests that update tests
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Unit tests fail
3 participants