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

Refactor mock webserver into a fixture #1564

Merged
merged 2 commits into from
Dec 8, 2023

Conversation

jonathangreen
Copy link
Member

@jonathangreen jonathangreen commented Dec 8, 2023

Description

This makes two changes:

  • Turn mock_web_server into a fixture, since we use the same fixture function in a few places
  • Make sure when we are calling request_with_timeout we set timeout, backoff_factor, so that the tests don't have to wait for retries. This was making tests slower then they need to be.

Motivation and Context

I was troubleshooting what was causing slow tests in #1554. This was not the cause, but it was making out tests take longer then they needed to, so I thought I'd fix it while I noticed since it cuts down the time to run our core tests by about a minute for me.

How Has This Been Tested?

  • Running unit tests

Checklist

  • I have updated the documentation accordingly.
  • All new and existing tests passed.

@jonathangreen jonathangreen requested a review from a team December 8, 2023 15:43
Copy link

codecov bot commented Dec 8, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (a170786) 90.24% compared to head (30c1eb9) 90.24%.
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1564      +/-   ##
==========================================
- Coverage   90.24%   90.24%   -0.01%     
==========================================
  Files         237      237              
  Lines       28606    28606              
  Branches     6538     6538              
==========================================
- Hits        25816    25815       -1     
  Misses       1837     1837              
- Partials      953      954       +1     
Flag Coverage Δ
Api 75.34% <ø> (ø)
Core 59.93% <ø> (ø)
migration 26.87% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

Copy link
Contributor

@tdilauro tdilauro left a comment

Choose a reason for hiding this comment

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

The changes look good to me! 🍾

@jonathangreen jonathangreen merged commit ba3e35c into main Dec 8, 2023
30 checks passed
@jonathangreen jonathangreen deleted the feature/mock-webserver-fixture branch December 8, 2023 22:55
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.

2 participants