Skip to content

Conversation

mikeauclair
Copy link
Contributor

Summary

  • For mocks on functions that take complex types as arg, Sprintf-ing the actual value can be costly. Switch successful matches to use thunks to lazily render their output, and fully avoid rendering their output when there are no differences since we return a constant string in that case anyways

Changes

  • Switch to a string builder for accumulating output for better performance even when we do render

Motivation

  • We heavily use mocks at DevotedHealth, and use them frequently in gRPC contexts where we're mocking RPCs that take <Whatever>Request structs that are costly to %v via Sprintf. Sprintf showed up as a tangible contributor to runtime performance when profiling some of our heavier tests. The below ~5s cpu time spent on Sprintf goes away completely here in one of our exemplar tests
Screenshot 2024-06-25 at 12 16 35 PM

Related issues

@dolmen dolmen added pkg-mock Any issues related to Mock performance labels Oct 4, 2024
@brackendawson
Copy link
Collaborator

This includes the CallerInfo change from #1614

Copy link
Collaborator

@brackendawson brackendawson left a comment

Choose a reason for hiding this comment

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

I've considered and tried a similar approach before when trying to address #1597. It only removes the race from passing tests, though. If it comes with a sizable performance benefit I'm more than happy to lazily render these.

I'd like it to be separated from #1614, they're not dependant on one another, right?

Then there's some changes I'd like around the use of outputRenderers. I'm fairly sure the slice isn't even necessary, you can change actualFmt's type from string to func() string and change all its references to actualFmt().

Comment on lines 276 to 290
if !more {
// We know we already have less than a buffer's worth of frames
if !maybeMore {
break
}
offset += stackFrameBufferSize
n = runtime.Callers(offset, pcs)
if n == 0 {
break
}

maybeMore = n == stackFrameBufferSize

frames = runtime.CallersFrames(pcs[:n])
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm not a fan of more and maybeMore, this code is actually two nested loops and I think it would be more readable if you coded it that way. I think that pure behaviour is usually better than data (varibles) used only to alter behaviour.

This code is also from #1614, it might be quicker to review this change if you keep the two PRs separate.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I split this back out. My suspicion is that I opened PRs both on upstream and on our fork, and in the process of merging this into master on our fork the branch got updated.

@mikeauclair
Copy link
Contributor Author

I'd like it to be separated from #1614, they're not dependant on one another, right?

I honestly don't remember if they are or are not given how long it's been since I wrote this. I can try to take a pass on cleaning this and the other PR up after next week (short week for thanksgiving in the states)

@mikeauclair mikeauclair force-pushed the mauclair-mock-match-sprintf branch from d45244f to 3d98e69 Compare December 17, 2024 18:26
Copy link
Collaborator

@brackendawson brackendawson left a comment

Choose a reason for hiding this comment

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

I think if #1693 were merged then this would still offer a performance benefit in finding the closest match when there are no exact matches.

Though, a better approach might be to fully separate finding the first exact match, finding the closest match, then rendering the diff of the closest match. Diff is getting awfully complicated and has a few too many responsibilities.

mock/mock.go Outdated
outputRenderers := []outputRenderer{}

for j := 0; j < maxArgCount; j++ {
i := j
Copy link
Collaborator

Choose a reason for hiding this comment

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

What's the difference between i and j?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We close over the loop variable in the renderers, so this is to avoid the pre-1.22 loopvar behavior issues. Can definitely drop depending on support requirements

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ah of course we do. I mistook it for an artefact from the removal of the outer loop. Could you make it into i := i? It is legal and I think more clearly communicates to most gophers that you're deliberately re-scoping the variable.

Copy link
Collaborator

@brackendawson brackendawson left a comment

Choose a reason for hiding this comment

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

I'm happy with the code and I'm happy enough with the approach being a step towards argument matching in Mock.Called with fewer race conditions.

This should make no change to the text output of the library. But due to the frailty of the area of code it touches I'm going to allow a couple of weeks for other maintainers to comment.

@brackendawson brackendawson merged commit a31a53e into stretchr:master May 6, 2025
8 checks passed
@brackendawson
Copy link
Collaborator

Thank you for your contribution.

@dolmen dolmen added internal/optimization Improve speed or reduce memory usage and removed performance labels May 30, 2025
apricote pushed a commit to hetznercloud/fleeting-plugin-hetzner that referenced this pull request Aug 27, 2025
…nercloud/fleeting-plugin-hetzner!273)

This MR contains the following updates:

| Package | Change | Age | Confidence |
|---|---|---|---|
| [github.com/stretchr/testify](https://github.com/stretchr/testify) | `v1.10.0` -> `v1.11.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fstretchr%2ftestify/v1.11.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fstretchr%2ftestify/v1.10.0/v1.11.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>stretchr/testify (github.com/stretchr/testify)</summary>

### [`v1.11.0`](https://github.com/stretchr/testify/releases/tag/v1.11.0)

[Compare Source](stretchr/testify@v1.10.0...v1.11.0)

#### What's Changed

##### Functional Changes

v1.11.0 Includes a number of performance improvements.

- Call stack perf change for CallerInfo by [@&#8203;mikeauclair](https://github.com/mikeauclair) in [#&#8203;1614](stretchr/testify#1614)
- Lazily render mock diff output on successful match by [@&#8203;mikeauclair](https://github.com/mikeauclair) in [#&#8203;1615](stretchr/testify#1615)
- assert: check early in Eventually, EventuallyWithT, and Never by [@&#8203;cszczepaniak](https://github.com/cszczepaniak) in [#&#8203;1427](stretchr/testify#1427)
- assert: add IsNotType by [@&#8203;bartventer](https://github.com/bartventer) in [#&#8203;1730](stretchr/testify#1730)
- assert.JSONEq: shortcut if same strings by [@&#8203;dolmen](https://github.com/dolmen) in [#&#8203;1754](stretchr/testify#1754)
- assert.YAMLEq: shortcut if same strings by [@&#8203;dolmen](https://github.com/dolmen) in [#&#8203;1755](stretchr/testify#1755)
- assert: faster and simpler isEmpty using reflect.Value.IsZero by [@&#8203;dolmen](https://github.com/dolmen) in [#&#8203;1761](stretchr/testify#1761)
- suite: faster methods filtering (internal refactor) by [@&#8203;dolmen](https://github.com/dolmen) in [#&#8203;1758](stretchr/testify#1758)

##### Fixes

- assert.ErrorAs: log target type by [@&#8203;craig65535](https://github.com/craig65535) in [#&#8203;1345](stretchr/testify#1345)
- Fix failure message formatting for Positive and Negative asserts in [#&#8203;1062](stretchr/testify#1062)
- Improve ErrorIs message when error is nil but an error was expected by [@&#8203;tsioftas](https://github.com/tsioftas) in [#&#8203;1681](stretchr/testify#1681)
- fix Subset/NotSubset when calling with mixed input types by [@&#8203;siliconbrain](https://github.com/siliconbrain) in [#&#8203;1729](stretchr/testify#1729)
- Improve ErrorAs failure message when error is nil by [@&#8203;ccoVeille](https://github.com/ccoVeille) in [#&#8203;1734](stretchr/testify#1734)
- mock.AssertNumberOfCalls: improve error msg by [@&#8203;3scalation](https://github.com/3scalation) in [#&#8203;1743](stretchr/testify#1743)

##### Documentation, Build & CI

- docs: Fix typo in README by [@&#8203;alexandear](https://github.com/alexandear) in [#&#8203;1688](stretchr/testify#1688)
- Replace deprecated io/ioutil with io and os by [@&#8203;alexandear](https://github.com/alexandear) in [#&#8203;1684](stretchr/testify#1684)
- Document consequences of calling t.FailNow() by [@&#8203;greg0ire](https://github.com/greg0ire) in [#&#8203;1710](stretchr/testify#1710)
- chore: update docs for Unset [#&#8203;1621](stretchr/testify#1621) by [@&#8203;techfg](https://github.com/techfg) in [#&#8203;1709](stretchr/testify#1709)
- README: apply gofmt to examples by [@&#8203;alexandear](https://github.com/alexandear) in [#&#8203;1687](stretchr/testify#1687)
- refactor: use %q and %T to simplify fmt.Sprintf by [@&#8203;alexandear](https://github.com/alexandear) in [#&#8203;1674](stretchr/testify#1674)
- Propose Christophe Colombier (ccoVeille) as approver by [@&#8203;brackendawson](https://github.com/brackendawson) in [#&#8203;1716](stretchr/testify#1716)
- Update documentation for the Error function in assert or require package by [@&#8203;architagr](https://github.com/architagr) in [#&#8203;1675](stretchr/testify#1675)
- assert: remove deprecated build constraints by [@&#8203;alexandear](https://github.com/alexandear) in [#&#8203;1671](stretchr/testify#1671)
- assert: apply gofumpt to internal test suite by [@&#8203;ccoVeille](https://github.com/ccoVeille) in [#&#8203;1739](stretchr/testify#1739)
- CI: fix shebang in .ci.\*.sh scripts by [@&#8203;dolmen](https://github.com/dolmen) in [#&#8203;1746](stretchr/testify#1746)
- assert,require: enable parallel testing on (almost) all top tests by [@&#8203;dolmen](https://github.com/dolmen) in [#&#8203;1747](stretchr/testify#1747)
- suite.Passed: add one more status test report by [@&#8203;Ararsa-Derese](https://github.com/Ararsa-Derese) in [#&#8203;1706](stretchr/testify#1706)
- Add Helper() method in internal mocks and assert.CollectT by [@&#8203;dolmen](https://github.com/dolmen) in [#&#8203;1423](stretchr/testify#1423)
- assert.Same/NotSame: improve usage of Sprintf by [@&#8203;ccoVeille](https://github.com/ccoVeille) in [#&#8203;1742](stretchr/testify#1742)
- mock: enable parallel testing on internal testsuite by [@&#8203;dolmen](https://github.com/dolmen) in [#&#8203;1756](stretchr/testify#1756)
- suite: cleanup use of 'testing' internals at runtime by [@&#8203;dolmen](https://github.com/dolmen) in [#&#8203;1751](stretchr/testify#1751)
- assert: check test failure message for Empty and NotEmpty  by [@&#8203;ccoVeille](https://github.com/ccoVeille) in [#&#8203;1745](stretchr/testify#1745)
- deps: fix dependency cycle with objx (again) by [@&#8203;dolmen](https://github.com/dolmen) in [#&#8203;1567](stretchr/testify#1567)
- assert.Empty: comprehensive doc of "Empty"-ness rules by [@&#8203;dolmen](https://github.com/dolmen) in [#&#8203;1753](stretchr/testify#1753)
- doc: improve godoc of top level 'testify' package by [@&#8203;dolmen](https://github.com/dolmen) in [#&#8203;1760](stretchr/testify#1760)
- assert.ErrorAs: simplify retrieving the type name by [@&#8203;ccoVeille](https://github.com/ccoVeille) in [#&#8203;1740](stretchr/testify#1740)
- assert.EqualValues: improve test coverage to 100% by [@&#8203;dolmen](https://github.com/dolmen) in [#&#8203;1763](stretchr/testify#1763)
- suite.Run: simplify running of Setup/TeardownSuite by [@&#8203;renzoarreaza](https://github.com/renzoarreaza) in [#&#8203;1769](stretchr/testify#1769)
- assert.CallerInfo: micro optimization by using LastIndexByte by [@&#8203;dolmen](https://github.com/dolmen) in [#&#8203;1767](stretchr/testify#1767)
- assert.CallerInfo: micro cleanup by [@&#8203;dolmen](https://github.com/dolmen) in [#&#8203;1768](stretchr/testify#1768)
- assert: refactor Test*FileExists and Test*DirExists tests to enable parallel testing by [@&#8203;dolmen](https://github.com/dolmen) in [#&#8203;1766](stretchr/testify#1766)
- suite.Run: refactor handling of stats for improved readability by [@&#8203;dolmen](https://github.com/dolmen) in [#&#8203;1764](stretchr/testify#1764)
- tests: improve captureTestingT helper by [@&#8203;ccoVeille](https://github.com/ccoVeille) in [#&#8203;1741](stretchr/testify#1741)
- build(deps): bump actions/checkout from 4 to 5 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;1778](stretchr/testify#1778)

#### New Contributors

- [@&#8203;greg0ire](https://github.com/greg0ire) made their first contribution in [#&#8203;1710](stretchr/testify#1710)
- [@&#8203;techfg](https://github.com/techfg) made their first contribution in [#&#8203;1709](stretchr/testify#1709)
- [@&#8203;mikeauclair](https://github.com/mikeauclair) made their first contribution in [#&#8203;1614](stretchr/testify#1614)
- [@&#8203;cszczepaniak](https://github.com/cszczepaniak) made their first contribution in [#&#8203;1427](stretchr/testify#1427)
- [@&#8203;architagr](https://github.com/architagr) made their first contribution in [#&#8203;1675](stretchr/testify#1675)
- [@&#8203;tsioftas](https://github.com/tsioftas) made their first contribution in [#&#8203;1681](stretchr/testify#1681)
- [@&#8203;siliconbrain](https://github.com/siliconbrain) made their first contribution in [#&#8203;1729](stretchr/testify#1729)
- [@&#8203;bartventer](https://github.com/bartventer) made their first contribution in [#&#8203;1730](stretchr/testify#1730)
- [@&#8203;Ararsa-Derese](https://github.com/Ararsa-Derese) made their first contribution in [#&#8203;1706](stretchr/testify#1706)
- [@&#8203;renzoarreaza](https://github.com/renzoarreaza) made their first contribution in [#&#8203;1769](stretchr/testify#1769)
- [@&#8203;3scalation](https://github.com/3scalation) made their first contribution in [#&#8203;1743](stretchr/testify#1743)

**Full Changelog**: <stretchr/testify@v1.10.0...v1.11.0>

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever MR is behind base branch, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this MR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS44Mi4xMCIsInVwZGF0ZWRJblZlciI6IjQxLjgyLjEwIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
brackendawson added a commit to brackendawson/testify that referenced this pull request Aug 27, 2025
…mock-match-sprintf"

This reverts commit a31a53e, reversing
changes made to 5ac6528.
@brackendawson
Copy link
Collaborator

This was reverted by #1786 because it did not properly implement lazy rendering when there was more than one expected call. I anticipate that the fix for #643 will properly implement lazy rendering.

project-mirrors-bot-tu bot pushed a commit to project-mirrors/forgejo-runner-as-gitea-act-runner-fork that referenced this pull request Aug 28, 2025
This PR contains the following updates:

| Package | Change | Age | Confidence |
|---|---|---|---|
| [github.com/stretchr/testify](https://github.com/stretchr/testify) | `v1.10.0` -> `v1.11.1` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fstretchr%2ftestify/v1.11.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fstretchr%2ftestify/v1.10.0/v1.11.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>stretchr/testify (github.com/stretchr/testify)</summary>

### [`v1.11.1`](https://github.com/stretchr/testify/releases/tag/v1.11.1)

[Compare Source](stretchr/testify@v1.11.0...v1.11.1)

This release fixes [#&#8203;1785](stretchr/testify#1785) introduced in v1.11.0 where expected argument values implementing the stringer interface (`String() string`) with a method which mutates their value, when passed to mock.Mock.On (`m.On("Method", <expected>).Return()`) or actual argument values passed to mock.Mock.Called may no longer match one another where they previously did match. The behaviour prior to v1.11.0 where the stringer is always called is restored. Future testify releases may not call the stringer method at all in this case.

#### What's Changed

- Backport [#&#8203;1786](stretchr/testify#1786) to release/1.11: mock: revert to pre-v1.11.0 argument matching behavior for mutating stringers by [@&#8203;brackendawson](https://github.com/brackendawson) in [#&#8203;1788](stretchr/testify#1788)

**Full Changelog**: <stretchr/testify@v1.11.0...v1.11.1>

### [`v1.11.0`](https://github.com/stretchr/testify/releases/tag/v1.11.0)

[Compare Source](stretchr/testify@v1.10.0...v1.11.0)

#### What's Changed

##### Functional Changes

v1.11.0 Includes a number of performance improvements.

- Call stack perf change for CallerInfo by [@&#8203;mikeauclair](https://github.com/mikeauclair) in [#&#8203;1614](stretchr/testify#1614)
- Lazily render mock diff output on successful match by [@&#8203;mikeauclair](https://github.com/mikeauclair) in [#&#8203;1615](stretchr/testify#1615)
- assert: check early in Eventually, EventuallyWithT, and Never by [@&#8203;cszczepaniak](https://github.com/cszczepaniak) in [#&#8203;1427](stretchr/testify#1427)
- assert: add IsNotType by [@&#8203;bartventer](https://github.com/bartventer) in [#&#8203;1730](stretchr/testify#1730)
- assert.JSONEq: shortcut if same strings by [@&#8203;dolmen](https://github.com/dolmen) in [#&#8203;1754](stretchr/testify#1754)
- assert.YAMLEq: shortcut if same strings by [@&#8203;dolmen](https://github.com/dolmen) in [#&#8203;1755](stretchr/testify#1755)
- assert: faster and simpler isEmpty using reflect.Value.IsZero by [@&#8203;dolmen](https://github.com/dolmen) in [#&#8203;1761](stretchr/testify#1761)
- suite: faster methods filtering (internal refactor) by [@&#8203;dolmen](https://github.com/dolmen) in [#&#8203;1758](stretchr/testify#1758)

##### Fixes

- assert.ErrorAs: log target type by [@&#8203;craig65535](https://github.com/craig65535) in [#&#8203;1345](stretchr/testify#1345)
- Fix failure message formatting for Positive and Negative asserts in [#&#8203;1062](stretchr/testify#1062)
- Improve ErrorIs message when error is nil but an error was expected by [@&#8203;tsioftas](https://github.com/tsioftas) in [#&#8203;1681](stretchr/testify#1681)
- fix Subset/NotSubset when calling with mixed input types by [@&#8203;siliconbrain](https://github.com/siliconbrain) in [#&#8203;1729](stretchr/testify#1729)
- Improve ErrorAs failure message when error is nil by [@&#8203;ccoVeille](https://github.com/ccoVeille) in [#&#8203;1734](stretchr/testify#1734)
- mock.AssertNumberOfCalls: improve error msg by [@&#8203;3scalation](https://github.com/3scalation) in [#&#8203;1743](stretchr/testify#1743)

##### Documentation, Build & CI

- docs: Fix typo in README by [@&#8203;alexandear](https://github.com/alexandear) in [#&#8203;1688](stretchr/testify#1688)
- Replace deprecated io/ioutil with io and os by [@&#8203;alexandear](https://github.com/alexandear) in [#&#8203;1684](stretchr/testify#1684)
- Document consequences of calling t.FailNow() by [@&#8203;greg0ire](https://github.com/greg0ire) in [#&#8203;1710](stretchr/testify#1710)
- chore: update docs for Unset [#&#8203;1621](stretchr/testify#1621) by [@&#8203;techfg](https://github.com/techfg) in [#&#8203;1709](stretchr/testify#1709)
- README: apply gofmt to examples by [@&#8203;alexandear](https://github.com/alexandear) in [#&#8203;1687](stretchr/testify#1687)
- refactor: use %q and %T to simplify fmt.Sprintf by [@&#8203;alexandear](https://github.com/alexandear) in [#&#8203;1674](stretchr/testify#1674)
- Propose Christophe Colombier (ccoVeille) as approver by [@&#8203;brackendawson](https://github.com/brackendawson) in [#&#8203;1716](stretchr/testify#1716)
- Update documentation for the Error function in assert or require package by [@&#8203;architagr](https://github.com/architagr) in [#&#8203;1675](stretchr/testify#1675)
- assert: remove deprecated build constraints by [@&#8203;alexandear](https://github.com/alexandear) in [#&#8203;1671](stretchr/testify#1671)
- assert: apply gofumpt to internal test suite by [@&#8203;ccoVeille](https://github.com/ccoVeille) in [#&#8203;1739](stretchr/testify#1739)
- CI: fix shebang in .ci.\*.sh scripts by [@&#8203;dolmen](https://github.com/dolmen) in [#&#8203;1746](stretchr/testify#1746)
- assert,require: enable parallel testing on (almost) all top tests by [@&#8203;dolmen](https://github.com/dolmen) in [#&#8203;1747](stretchr/testify#1747)
- suite.Passed: add one more status test report by [@&#8203;Ararsa-Derese](https://github.com/Ararsa-Derese) in [#&#8203;1706](stretchr/testify#1706)
- Add Helper() method in internal mocks and assert.CollectT by [@&#8203;dolmen](https://github.com/dolmen) in [#&#8203;1423](stretchr/testify#1423)
- assert.Same/NotSame: improve usage of Sprintf by [@&#8203;ccoVeille](https://github.com/ccoVeille) in [#&#8203;1742](stretchr/testify#1742)
- mock: enable parallel testing on internal testsuite by [@&#8203;dolmen](https://github.com/dolmen) in [#&#8203;1756](stretchr/testify#1756)
- suite: cleanup use of 'testing' internals at runtime by [@&#8203;dolmen](https://github.com/dolmen) in [#&#8203;1751](stretchr/testify#1751)
- assert: check test failure message for Empty and NotEmpty  by [@&#8203;ccoVeille](https://github.com/ccoVeille) in [#&#8203;1745](stretchr/testify#1745)
- deps: fix dependency cycle with objx (again) by [@&#8203;dolmen](https://github.com/dolmen) in [#&#8203;1567](stretchr/testify#1567)
- assert.Empty: comprehensive doc of "Empty"-ness rules by [@&#8203;dolmen](https://github.com/dolmen) in [#&#8203;1753](stretchr/testify#1753)
- doc: improve godoc of top level 'testify' package by [@&#8203;dolmen](https://github.com/dolmen) in [#&#8203;1760](stretchr/testify#1760)
- assert.ErrorAs: simplify retrieving the type name by [@&#8203;ccoVeille](https://github.com/ccoVeille) in [#&#8203;1740](stretchr/testify#1740)
- assert.EqualValues: improve test coverage to 100% by [@&#8203;dolmen](https://github.com/dolmen) in [#&#8203;1763](stretchr/testify#1763)
- suite.Run: simplify running of Setup/TeardownSuite by [@&#8203;renzoarreaza](https://github.com/renzoarreaza) in [#&#8203;1769](stretchr/testify#1769)
- assert.CallerInfo: micro optimization by using LastIndexByte by [@&#8203;dolmen](https://github.com/dolmen) in [#&#8203;1767](stretchr/testify#1767)
- assert.CallerInfo: micro cleanup by [@&#8203;dolmen](https://github.com/dolmen) in [#&#8203;1768](stretchr/testify#1768)
- assert: refactor Test*FileExists and Test*DirExists tests to enable parallel testing by [@&#8203;dolmen](https://github.com/dolmen) in [#&#8203;1766](stretchr/testify#1766)
- suite.Run: refactor handling of stats for improved readability by [@&#8203;dolmen](https://github.com/dolmen) in [#&#8203;1764](stretchr/testify#1764)
- tests: improve captureTestingT helper by [@&#8203;ccoVeille](https://github.com/ccoVeille) in [#&#8203;1741](stretchr/testify#1741)
- build(deps): bump actions/checkout from 4 to 5 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;1778](stretchr/testify#1778)

#### New Contributors

- [@&#8203;greg0ire](https://github.com/greg0ire) made their first contribution in [#&#8203;1710](stretchr/testify#1710)
- [@&#8203;techfg](https://github.com/techfg) made their first contribution in [#&#8203;1709](stretchr/testify#1709)
- [@&#8203;mikeauclair](https://github.com/mikeauclair) made their first contribution in [#&#8203;1614](stretchr/testify#1614)
- [@&#8203;cszczepaniak](https://github.com/cszczepaniak) made their first contribution in [#&#8203;1427](stretchr/testify#1427)
- [@&#8203;architagr](https://github.com/architagr) made their first contribution in [#&#8203;1675](stretchr/testify#1675)
- [@&#8203;tsioftas](https://github.com/tsioftas) made their first contribution in [#&#8203;1681](stretchr/testify#1681)
- [@&#8203;siliconbrain](https://github.com/siliconbrain) made their first contribution in [#&#8203;1729](stretchr/testify#1729)
- [@&#8203;bartventer](https://github.com/bartventer) made their first contribution in [#&#8203;1730](stretchr/testify#1730)
- [@&#8203;Ararsa-Derese](https://github.com/Ararsa-Derese) made their first contribution in [#&#8203;1706](stretchr/testify#1706)
- [@&#8203;renzoarreaza](https://github.com/renzoarreaza) made their first contribution in [#&#8203;1769](stretchr/testify#1769)
- [@&#8203;3scalation](https://github.com/3scalation) made their first contribution in [#&#8203;1743](stretchr/testify#1743)

**Full Changelog**: <stretchr/testify@v1.10.0...v1.11.0>

</details>

---

### Configuration

📅 **Schedule**: Branch creation - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC), Automerge - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS44Mi4xMCIsInVwZGF0ZWRJblZlciI6IjQxLjgyLjEwIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJLaW5kL0Nob3JlIl19-->

<!--start release-notes-assistant-->
<!--URL:https://code.forgejo.org/forgejo/runner-->
- other
  - [PR](https://code.forgejo.org/forgejo/runner/pulls/915): <!--number 915 --><!--line 0 --><!--description VXBkYXRlIG1vZHVsZSBnaXRodWIuY29tL3N0cmV0Y2hyL3Rlc3RpZnkgdG8gdjEuMTEuMQ==-->Update module github.com/stretchr/testify to v1.11.1<!--description-->
<!--end release-notes-assistant-->

Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/915
Reviewed-by: earl-warren <[email protected]>
Co-authored-by: Renovate Bot <[email protected]>
Co-committed-by: Renovate Bot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal/optimization Improve speed or reduce memory usage pkg-mock Any issues related to Mock
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants