Skip to content

Commit

Permalink
tests: fix TestNewAnyWithCustomTypeURLWithErrorNoAllocation failure (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
julienrbrt authored Apr 21, 2022
1 parent c01b825 commit f421b95
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions codec/types/any_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ var eom = &errOnMarshal{}
// Ensure that returning an error doesn't suddenly allocate and waste bytes.
// See https://github.com/cosmos/cosmos-sdk/issues/8537
func TestNewAnyWithCustomTypeURLWithErrorNoAllocation(t *testing.T) {
// make sure we're not in the middle of a GC.
runtime.GC()

var ms1, ms2 runtime.MemStats
runtime.ReadMemStats(&ms1)
any, err := types.NewAnyWithValue(eom)
Expand Down

0 comments on commit f421b95

Please sign in to comment.