mirror of
https://github.com/stretchr/testify.git
synced 2025-05-31 11:42:44 +00:00
[Fix] The most recent changes to golang/protobuf breaks the spew Circular data structure detection
The latest update to golang/protobuf (I am on v1.4.2) break the spew circular data structure detection. This means that when calling `assert.Equal(t, proto1, proto2)` will not only fail, but also enter an infinite recursion. Given spew is not being actively maintained, and tesitfy should set some upper bound, we need to set a `MaxDepth` to some very high number, so at least the test will not run for a very long time and finish and fail quickly.
This commit is contained in:
parent
dc8af7208c
commit
8fb4b2442e
@ -1622,6 +1622,7 @@ var spewConfig = spew.ConfigState{
|
|||||||
DisableCapacities: true,
|
DisableCapacities: true,
|
||||||
SortKeys: true,
|
SortKeys: true,
|
||||||
DisableMethods: true,
|
DisableMethods: true,
|
||||||
|
MaxDepth: 100,
|
||||||
}
|
}
|
||||||
|
|
||||||
type tHelper interface {
|
type tHelper interface {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user