Skip to content

docs: mocking errors#1683

Merged
dbolduc merged 2 commits intogoogleapis:mainfrom
dbolduc:user-guide-mocking-addendum
Apr 2, 2025
Merged

docs: mocking errors#1683
dbolduc merged 2 commits intogoogleapis:mainfrom
dbolduc:user-guide-mocking-addendum

Conversation

@dbolduc
Copy link
Member

@dbolduc dbolduc commented Apr 1, 2025

Follow-up to #1654

I felt this did not go without saying, so I said it.


Note that a client built `from_stub()` does not have an internal retry loop. It
returns all errors from the stub directly to the application.

Copy link
Collaborator

Choose a reason for hiding this comment

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

In other sections I link the full function for each sub-section separately. Consider doing the same here.

Copy link
Member Author

Choose a reason for hiding this comment

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

Um, I think I will pass. The tests have shared code, so I do not think the sub-sections would actually be "full".

Copy link
Member Author

Choose a reason for hiding this comment

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

Um, I think I will pass. The tests have shared code, so I do not think the sub-sections would actually be "full".

Strike this. I just realized we can have an anchor in multiple places, and mdbook will concatenate the sections. e.g.

// ANCHOR: foo
1
// ANCHOR_END: foo
2
3
4
// ANCHOR: foo
5
// ANCHOR_END: foo

yields:

1
5

So I am out of excuses. Will clean this up soon-ish.

Copy link
Member Author

Choose a reason for hiding this comment

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

Nevermind. The mdbook behavior I described is totally unreliable. :(

Copy link
Member Author

Choose a reason for hiding this comment

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

totally unreliable

Lol, I finally understand...

{{#include ... }} will not concatenate sections with the same marker.

{{#rustdoc_include ... }} will concatenate sections with the same marker.

I was switching between the two unreliably.

@codecov
Copy link

codecov bot commented Apr 1, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.94%. Comparing base (3afd174) to head (fb7b161).
Report is 8 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1683   +/-   ##
=======================================
  Coverage   95.94%   95.94%           
=======================================
  Files          47       47           
  Lines        1850     1850           
=======================================
  Hits         1775     1775           
  Misses         75       75           

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

@dbolduc dbolduc marked this pull request as ready for review April 1, 2025 22:58
@dbolduc dbolduc merged commit 57fe13a into googleapis:main Apr 2, 2025
20 checks passed
@dbolduc dbolduc deleted the user-guide-mocking-addendum branch April 2, 2025 19:34
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