Skip to content

Conversation

@zimeg
Copy link
Member

@zimeg zimeg commented Oct 31, 2025

Summary

This PR refactors tests to use the NewFakeClient more often for less duplication and perhaps faster test runs?

Notes

  • Recent passing unit tests on main: 46 seconds ⏳

Requirements

@zimeg zimeg self-assigned this Oct 31, 2025
@zimeg zimeg requested a review from a team as a code owner October 31, 2025 08:55
@zimeg zimeg added code health M-T: Test improvements and anything that improves code health semver:patch Use on pull requests to describe the release version increment labels Oct 31, 2025
@codecov
Copy link

codecov bot commented Oct 31, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 64.59%. Comparing base (13f00d3) to head (2f59f1e).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #254      +/-   ##
==========================================
+ Coverage   64.58%   64.59%   +0.01%     
==========================================
  Files         212      212              
  Lines       17505    17505              
==========================================
+ Hits        11305    11308       +3     
+ Misses       5134     5133       -1     
+ Partials     1066     1064       -2     

☔ View full report in Codecov by Sentry.
📢 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.

@zimeg
Copy link
Member Author

zimeg commented Oct 31, 2025

👻 Spooked but initial tests ran not as fast: 1 minute 8 seconds

Edit: I don't think this should motivate the change - was curious!

Base automatically changed from zimeg-style-fprintf-writestring to main October 31, 2025 20:56
@mwbrooks mwbrooks added this to the Next Release milestone Nov 7, 2025
Copy link
Member

@mwbrooks mwbrooks left a comment

Choose a reason for hiding this comment

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

🦸🏻 Heroic test refactor @zimeg! Thanks for bringing in our table test standard format as well!

🧠 In the future, we may want to rename FakeClient to MockClient (or ClientMock).

Copy link
Member

Choose a reason for hiding this comment

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

praise: 👌🏻

@zimeg
Copy link
Member Author

zimeg commented Nov 10, 2025

@mwbrooks Thanks so much for a kind review too! I'm optimistic that these changes will make ongoing contribution a bit more clear in pattern so let's merge this now.

In the future, we may want to rename FakeClient to MockClient (or ClientMock).

Oh I thought about this too but found it unclear if a "fake" client was meant to be different than a "mock" client... So open to this follow up if it makes more sense to you! 💡

@zimeg zimeg merged commit 9946136 into main Nov 10, 2025
9 of 10 checks passed
@zimeg zimeg deleted the zimeg-test-fake-http-client branch November 10, 2025 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

code health M-T: Test improvements and anything that improves code health semver:patch Use on pull requests to describe the release version increment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants