agiledragon / gomonkey

gomonkey is a library to make monkey patching in unit tests easy
MIT License
1.92k stars 178 forks source link

MacOS ARM64 兼容性问题 #148

Open alpha-baby opened 7 months ago

alpha-baby commented 7 months ago

我本地是 2021款 m1 pro, mac os 13.2.1 (22D68)

go version go1.18.10 darwin/arm64

我把代码最新拉取到本地直接跑项目自带的单测,很多都跑不起来, 比如:

go test -gcflags="all=-l -N" -v -run=^TestApplyMethodFunc$ .
=== RUN   TestApplyMethodFunc

  TestApplyMethodFunc 
    for succ Slice: Add elem: 1 succ
✔✔Slice: Remove elem: 1 succ
✔✔
    for already exist Slice: Add elem: 2 succ
✔Slice: Add elem: 1 succ
✘
    two methods Slice: Add elem: 3 succ
✔✔✔✘Slice: Remove elem: 3 succ

    one func and one method Slice: Add elem: 4 succ
✔✘Slice: Remove elem: 4 succ

    for variadic method Slice: Append elem: [1 2 3] succ
✔✔✔

Failures:

  * /bak/gomonkey/test/apply_method_func_test.go 
  Line 41:
  Expected: 'elem already exist'
  Actual:   '<nil>'
  (Should be equal)
  goroutine 20 [running]:
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/reporting/reports.go:143 +0x50
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/reporting/reports.go:103 +0x98
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:176 +0x8c
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/doc.go:125 +0x58
  github.com/agiledragon/gomonkey/v2/test.TestApplyMethodFunc.func1.2()
        /bak/gomonkey/test/apply_method_func_test.go:41 +0x274
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/discovery.go:80 +0x2c
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:261 +0x208
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:163 +0x60
  github.com/jtolds/gls.(*ContextManager).SetValues.func1(0x0)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:97 +0x4dc
  github.com/jtolds/gls.EnsureGoroutineId(0x140000a4c00)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/gid.go:19 +0x58
  github.com/jtolds/gls.(*ContextManager).SetValues(0x1400008e3a0, 0x140000a4ba0, 0x140000ae2d0)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:63 +0x230
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:162 +0x63c
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/doc.go:77 +0x48
  github.com/agiledragon/gomonkey/v2/test.TestApplyMethodFunc.func1()
        /bak/gomonkey/test/apply_method_func_test.go:33 +0x210
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/discovery.go:80 +0x2c
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:261 +0x208
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:110 +0x164
  github.com/jtolds/gls.(*ContextManager).SetValues.func1(0x0)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:97 +0x4dc
  github.com/jtolds/gls.EnsureGoroutineId.func1()
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/gid.go:24 +0x38
  github.com/jtolds/gls._m(0x0, 0x140000ae120)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/stack_tags.go:108 +0x38
  github.com/jtolds/gls.github_com_jtolds_gls_markS(0x0, 0x140000ae120)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/stack_tags.go:56 +0x28
  github.com/jtolds/gls.addStackTag(0x0, 0x140000ae120)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/stack_tags.go:49 +0x30
  github.com/jtolds/gls.EnsureGoroutineId(0x140000a4630)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/gid.go:24 +0x150
  github.com/jtolds/gls.(*ContextManager).SetValues(0x1400008e3a0, 0x140000a45d0, 0x140000900a0)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:63 +0x230
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:105 +0x350
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/doc.go:75 +0x5c
  github.com/agiledragon/gomonkey/v2/test.TestApplyMethodFunc(0x14000083860)
        /bak/gomonkey/test/apply_method_func_test.go:18 +0x1a0
  testing.tRunner(0x14000083860, 0x10515efd0)
        /.g/versions/1.18.10/src/testing/testing.go:1439 +0x178
  created by testing.(*T).Run
        /.g/versions/1.18.10/src/testing/testing.go:1486 +0x548

  * /bak/gomonkey/test/apply_method_func_test.go 
  Line 62:
  Expected: '1'
  Actual:   '3'
  (Should be equal)
  goroutine 20 [running]:
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/reporting/reports.go:143 +0x50
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/reporting/reports.go:103 +0x98
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:176 +0x8c
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/doc.go:125 +0x58
  github.com/agiledragon/gomonkey/v2/test.TestApplyMethodFunc.func1.3()
        /bak/gomonkey/test/apply_method_func_test.go:62 +0x4a4
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/discovery.go:80 +0x2c
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:261 +0x208
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:163 +0x60
  github.com/jtolds/gls.(*ContextManager).SetValues.func1(0x0)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:97 +0x4dc
  github.com/jtolds/gls.EnsureGoroutineId(0x140000a50b0)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/gid.go:19 +0x58
  github.com/jtolds/gls.(*ContextManager).SetValues(0x1400008e3a0, 0x140000a5050, 0x140000ae468)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:63 +0x230
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:162 +0x63c
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/doc.go:77 +0x48
  github.com/agiledragon/gomonkey/v2/test.TestApplyMethodFunc.func1()
        /bak/gomonkey/test/apply_method_func_test.go:47 +0x300
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/discovery.go:80 +0x2c
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:261 +0x208
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:110 +0x164
  github.com/jtolds/gls.(*ContextManager).SetValues.func1(0x0)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:97 +0x4dc
  github.com/jtolds/gls.EnsureGoroutineId.func1()
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/gid.go:24 +0x38
  github.com/jtolds/gls._m(0x0, 0x140000ae120)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/stack_tags.go:108 +0x38
  github.com/jtolds/gls.github_com_jtolds_gls_markS(0x0, 0x140000ae120)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/stack_tags.go:56 +0x28
  github.com/jtolds/gls.addStackTag(0x0, 0x140000ae120)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/stack_tags.go:49 +0x30
  github.com/jtolds/gls.EnsureGoroutineId(0x140000a4630)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/gid.go:24 +0x150
  github.com/jtolds/gls.(*ContextManager).SetValues(0x1400008e3a0, 0x140000a45d0, 0x140000900a0)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:63 +0x230
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:105 +0x350
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/doc.go:75 +0x5c
  github.com/agiledragon/gomonkey/v2/test.TestApplyMethodFunc(0x14000083860)
        /bak/gomonkey/test/apply_method_func_test.go:18 +0x1a0
  testing.tRunner(0x14000083860, 0x10515efd0)
        /.g/versions/1.18.10/src/testing/testing.go:1439 +0x178
  created by testing.(*T).Run
        /.g/versions/1.18.10/src/testing/testing.go:1486 +0x548

  * /bak/gomonkey/test/apply_method_func_test.go 
  Line 78:
  Expected: '<nil>'
  Actual:   'any'
  (Should be equal)
  goroutine 20 [running]:
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/reporting/reports.go:143 +0x50
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/reporting/reports.go:103 +0x98
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:176 +0x8c
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/doc.go:125 +0x58
  github.com/agiledragon/gomonkey/v2/test.TestApplyMethodFunc.func1.4()
        /bak/gomonkey/test/apply_method_func_test.go:78 +0x350
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/discovery.go:80 +0x2c
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:261 +0x208
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:163 +0x60
  github.com/jtolds/gls.(*ContextManager).SetValues.func1(0x0)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:97 +0x4dc
  github.com/jtolds/gls.EnsureGoroutineId(0x140000a53e0)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/gid.go:19 +0x58
  github.com/jtolds/gls.(*ContextManager).SetValues(0x1400008e3a0, 0x140000a5380, 0x140000ae5d0)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:63 +0x230
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:162 +0x63c
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/doc.go:77 +0x48
  github.com/agiledragon/gomonkey/v2/test.TestApplyMethodFunc.func1()
        /bak/gomonkey/test/apply_method_func_test.go:66 +0x3f0
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/discovery.go:80 +0x2c
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:261 +0x208
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:110 +0x164
  github.com/jtolds/gls.(*ContextManager).SetValues.func1(0x0)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:97 +0x4dc
  github.com/jtolds/gls.EnsureGoroutineId.func1()
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/gid.go:24 +0x38
  github.com/jtolds/gls._m(0x0, 0x140000ae120)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/stack_tags.go:108 +0x38
  github.com/jtolds/gls.github_com_jtolds_gls_markS(0x0, 0x140000ae120)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/stack_tags.go:56 +0x28
  github.com/jtolds/gls.addStackTag(0x0, 0x140000ae120)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/stack_tags.go:49 +0x30
  github.com/jtolds/gls.EnsureGoroutineId(0x140000a4630)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/gid.go:24 +0x150
  github.com/jtolds/gls.(*ContextManager).SetValues(0x1400008e3a0, 0x140000a45d0, 0x140000900a0)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:63 +0x230
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:105 +0x350
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/doc.go:75 +0x5c
  github.com/agiledragon/gomonkey/v2/test.TestApplyMethodFunc(0x14000083860)
        /bak/gomonkey/test/apply_method_func_test.go:18 +0x1a0
  testing.tRunner(0x14000083860, 0x10515efd0)
        /.g/versions/1.18.10/src/testing/testing.go:1439 +0x178
  created by testing.(*T).Run
        /.g/versions/1.18.10/src/testing/testing.go:1486 +0x548

15 total assertions

--- FAIL: TestApplyMethodFunc (0.00s)
FAIL
FAIL    github.com/agiledragon/gomonkey/v2/test 0.671s
FAIL

这只是启动一个单测,我建议在 github 上加上一个 CI 把,

alpha-baby commented 7 months ago
$ go test -gcflags="all=-l -N" -v -run=. .                    
=== RUN   TestApplyFuncReturn

  TestApplyFuncReturn 
    declares the values to be returned ✔✔✔✔✔✔✔✔✔✔✔✔✔✔✔✔✔✔✔✔✔✘

Failures:

  * /bak/gomonkey/test/apply_func_return_test.go 
  Line 35:
  Expected: 'hello golang'
  Actual:   'hello cpp'
  (Should be equal)
  goroutine 4 [running]:
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/reporting/reports.go:143 +0x50
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/reporting/reports.go:103 +0x98
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:176 +0x8c
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/doc.go:125 +0x58
  github.com/agiledragon/gomonkey/v2/test.TestApplyFuncReturn.func1.1()
        /bak/gomonkey/test/apply_func_return_test.go:35 +0x5f0
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/discovery.go:80 +0x2c
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:261 +0x208
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:163 +0x60
  github.com/jtolds/gls.(*ContextManager).SetValues.func1(0x0)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:97 +0x4dc
  github.com/jtolds/gls.EnsureGoroutineId(0x140000687b0)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/gid.go:19 +0x58
  github.com/jtolds/gls.(*ContextManager).SetValues(0x14000056540, 0x14000068750, 0x1400000c120)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:63 +0x230
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:162 +0x63c
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/doc.go:77 +0x48
  github.com/agiledragon/gomonkey/v2/test.TestApplyFuncReturn.func1()
        /bak/gomonkey/test/apply_func_return_test.go:17 +0x90
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/discovery.go:80 +0x2c
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:261 +0x208
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:110 +0x164
  github.com/jtolds/gls.(*ContextManager).SetValues.func1(0x0)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:97 +0x4dc
  github.com/jtolds/gls.EnsureGoroutineId.func1()
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/gid.go:24 +0x38
  github.com/jtolds/gls._m(0x0, 0x1400000c108)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/stack_tags.go:108 +0x38
  github.com/jtolds/gls.github_com_jtolds_gls_markS(0x0, 0x1400000c108)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/stack_tags.go:56 +0x28
  github.com/jtolds/gls.addStackTag(0x0, 0x1400000c108)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/stack_tags.go:49 +0x30
  github.com/jtolds/gls.EnsureGoroutineId(0x14000068660)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/gid.go:24 +0x150
  github.com/jtolds/gls.(*ContextManager).SetValues(0x14000056540, 0x14000068600, 0x14000120040)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:63 +0x230
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:105 +0x350
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/doc.go:75 +0x5c
  github.com/agiledragon/gomonkey/v2/test.TestApplyFuncReturn(0x140001321a0)
        /bak/gomonkey/test/apply_func_return_test.go:15 +0xdc
  testing.tRunner(0x140001321a0, 0x104eab080)
        /.g/versions/1.18.10/src/testing/testing.go:1439 +0x178
  created by testing.(*T).Run
        /.g/versions/1.18.10/src/testing/testing.go:1486 +0x548

22 total assertions

--- FAIL: TestApplyFuncReturn (0.00s)
=== RUN   TestApplyFuncSeq

  TestApplyFuncSeq 
    default times is 1 ✔✔✔✔✔✔
    retry succ util the third times 🔥
    batch operations failed on the third time ✔✔✔✔✔

Errors:

  * /bak/gomonkey/test/apply_func_seq_test.go 
  Line 48: - double seq is less than call seq 
  goroutine 5 [running]:
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/reporting/reports.go:148 +0x50
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/reporting/reports.go:121 +0x98
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:235 +0x10c
  panic({0x104e71200, 0x104eaba80})
        /.g/versions/1.18.10/src/runtime/panic.go:844 +0x26c
  github.com/agiledragon/gomonkey/v2.getDoubleFunc.func1({0x1400013e8c0, 0x1, 0x8})
        /bak/gomonkey/patch.go:319 +0x190
  github.com/agiledragon/gomonkey/v2/test.TestApplyFuncSeq.func1.2()
        /bak/gomonkey/test/apply_func_seq_test.go:48 +0x348
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/discovery.go:80 +0x2c
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:261 +0x208
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:163 +0x60
  github.com/jtolds/gls.(*ContextManager).SetValues.func1(0x0)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:97 +0x4dc
  github.com/jtolds/gls.EnsureGoroutineId(0x140000686c0)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/gid.go:19 +0x58
  github.com/jtolds/gls.(*ContextManager).SetValues(0x14000056540, 0x14000068660, 0x1400000c198)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:63 +0x230
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:162 +0x63c
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/doc.go:77 +0x48
  github.com/agiledragon/gomonkey/v2/test.TestApplyFuncSeq.func1()
        /bak/gomonkey/test/apply_func_seq_test.go:40 +0x104
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/discovery.go:80 +0x2c
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:261 +0x208
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:110 +0x164
  github.com/jtolds/gls.(*ContextManager).SetValues.func1(0x0)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:97 +0x4dc
  github.com/jtolds/gls.EnsureGoroutineId.func1()
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/gid.go:24 +0x38
  github.com/jtolds/gls._m(0x0, 0x1400000c690)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/stack_tags.go:108 +0x38
  github.com/jtolds/gls.github_com_jtolds_gls_markS(0x0, 0x1400000c690)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/stack_tags.go:56 +0x28
  github.com/jtolds/gls.addStackTag(0x0, 0x1400000c690)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/stack_tags.go:49 +0x30
  github.com/jtolds/gls.EnsureGoroutineId(0x14000068ff0)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/gid.go:24 +0x150
  github.com/jtolds/gls.(*ContextManager).SetValues(0x14000056540, 0x14000068f90, 0x140001201a0)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:63 +0x230
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:105 +0x350
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/doc.go:75 +0x5c
  github.com/agiledragon/gomonkey/v2/test.TestApplyFuncSeq(0x14000132680)
        /bak/gomonkey/test/apply_func_seq_test.go:13 +0xdc
  testing.tRunner(0x14000132680, 0x104eab0a8)
        /.g/versions/1.18.10/src/testing/testing.go:1439 +0x178
  created by testing.(*T).Run
        /.g/versions/1.18.10/src/testing/testing.go:1486 +0x548

  goroutine 1 [chan receive]:
  testing.(*T).Run(0x14000132680, {0x104e3a0bb, 0x10}, 0x104eab0a8)
        /.g/versions/1.18.10/src/testing/testing.go:1487 +0x568
  testing.runTests.func1(0x14000132000)
        /.g/versions/1.18.10/src/testing/testing.go:1839 +0xa8
  testing.tRunner(0x14000132000, 0x1400007b9d8)
        /.g/versions/1.18.10/src/testing/testing.go:1439 +0x178
  testing.runTests(0x1400000c090, {0x104fcb820, 0xe, 0xe}, {0xc153d5e9ce398a60, 0x8bb2dd5af7, 0x104fcfb80})
        /.g/versions/1.18.10/src/testing/testing.go:1837 +0x414
  testing.(*M).Run(0x140001041e0)
        /.g/versions/1.18.10/src/testing/testing.go:1719 +0x954
  main.main()
        _testmain.go:73 +0x8c

34 total assertions

--- FAIL: TestApplyFuncSeq (0.00s)
=== RUN   TestApplyFunc

  TestApplyFunc 
    one func for succ ✔✔
    one func for fail ✔✔
    two funcs ✔✔✔
    input and output param ✔✔✔
    repeat patch same func ✔✘
    declare partial args ✔✔✔✔✔✔✔

Failures:

  * /bak/gomonkey/test/apply_func_test.go 
  Line 79:
  Expected: 'patch1'
  Actual:   'Hello, World!'
  (Should be equal)
  goroutine 20 [running]:
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/reporting/reports.go:143 +0x50
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/reporting/reports.go:103 +0x98
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:176 +0x8c
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/doc.go:125 +0x58
  github.com/agiledragon/gomonkey/v2/test.TestApplyFunc.func1.5()
        /bak/gomonkey/test/apply_func_test.go:79 +0x1ec
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/discovery.go:80 +0x2c
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:261 +0x208
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:163 +0x60
  github.com/jtolds/gls.(*ContextManager).SetValues.func1(0x0)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:97 +0x4dc
  github.com/jtolds/gls.EnsureGoroutineId(0x14000069860)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/gid.go:19 +0x58
  github.com/jtolds/gls.(*ContextManager).SetValues(0x14000056540, 0x14000069800, 0x1400000c5d0)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:63 +0x230
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:162 +0x63c
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/doc.go:77 +0x48
  github.com/agiledragon/gomonkey/v2/test.TestApplyFunc.func1()
        /bak/gomonkey/test/apply_func_test.go:73 +0x268
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/discovery.go:80 +0x2c
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:261 +0x208
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:110 +0x164
  github.com/jtolds/gls.(*ContextManager).SetValues.func1(0x0)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:97 +0x4dc
  github.com/jtolds/gls.EnsureGoroutineId.func1()
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/gid.go:24 +0x38
  github.com/jtolds/gls._m(0x0, 0x1400000c3c0)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/stack_tags.go:108 +0x38
  github.com/jtolds/gls.github_com_jtolds_gls_markS(0x0, 0x1400000c3c0)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/stack_tags.go:56 +0x28
  github.com/jtolds/gls.addStackTag(0x0, 0x1400000c3c0)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/stack_tags.go:49 +0x30
  github.com/jtolds/gls.EnsureGoroutineId(0x14000068cc0)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/gid.go:24 +0x150
  github.com/jtolds/gls.(*ContextManager).SetValues(0x14000056540, 0x14000068c60, 0x140001201a0)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:63 +0x230
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:105 +0x350
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/doc.go:75 +0x5c
  github.com/agiledragon/gomonkey/v2/test.TestApplyFunc(0x14000082b60)
        /bak/gomonkey/test/apply_func_test.go:17 +0xdc
  testing.tRunner(0x14000082b60, 0x104eab118)
        /.g/versions/1.18.10/src/testing/testing.go:1439 +0x178
  created by testing.(*T).Run
        /.g/versions/1.18.10/src/testing/testing.go:1486 +0x548

53 total assertions

--- FAIL: TestApplyFunc (0.00s)
=== RUN   TestApplyFuncVarReturn

  TestApplyFuncVarReturn 
    declares the values to be returned ✔✔✔✔✔✔✔✔✔✔✔✔✔✔✔✔✔✔✔✔✔✔✔✔✔✔✔✔✔✔✔✔✔✔✔✔✔✔✔✔

93 total assertions

--- PASS: TestApplyFuncVarReturn (0.00s)
=== RUN   TestApplyFuncVarSeq

  TestApplyFuncVarSeq 
    default times is 1 ✔✔✔✔✔✔
    retry succ util the third times ✔✔✔✔
    batch operations failed on the third time ✔✔✔✔✔

108 total assertions

--- PASS: TestApplyFuncVarSeq (0.00s)
=== RUN   TestApplyFuncVar

  TestApplyFuncVar 
    for succ ✔✔
    for fail ✔

111 total assertions

--- PASS: TestApplyFuncVar (0.00s)
=== RUN   TestApplyGlobalVar

  TestApplyGlobalVar 
    change ✔
    recover ✔

113 total assertions

--- PASS: TestApplyGlobalVar (0.00s)
=== RUN   TestApplyInterfaceReused

  TestApplyInterfaceReused 
    TestApplyInterface ✔✔
    TestApplyInterfaceSeq ✔✔✔✔✔✔
    the arg type can be interface 🔥

Errors:

  * /bak/gomonkey/test/apply_interface_reused_test.go 
  Line 59: - double seq is less than call seq 
  goroutine 25 [running]:
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/reporting/reports.go:148 +0x50
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/reporting/reports.go:121 +0x98
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:235 +0x10c
  panic({0x104e71200, 0x104eaba80})
        /.g/versions/1.18.10/src/runtime/panic.go:844 +0x26c
  github.com/agiledragon/gomonkey/v2.getDoubleFunc.func1({0x1400013e9b0, 0x2, 0x8})
        /bak/gomonkey/patch.go:319 +0x190
  github.com/agiledragon/gomonkey/v2/test.TestApplyInterfaceReused.func1.4()
        /bak/gomonkey/test/apply_interface_reused_test.go:59 +0x110
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/discovery.go:80 +0x2c
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:261 +0x208
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:163 +0x60
  github.com/jtolds/gls.(*ContextManager).SetValues.func1(0x0)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:97 +0x4dc
  github.com/jtolds/gls.EnsureGoroutineId(0x1400015e150)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/gid.go:19 +0x58
  github.com/jtolds/gls.(*ContextManager).SetValues(0x14000056540, 0x1400015e0f0, 0x1400000dcc8)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:63 +0x230
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:162 +0x63c
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/doc.go:77 +0x48
  github.com/agiledragon/gomonkey/v2/test.TestApplyInterfaceReused.func1()
        /bak/gomonkey/test/apply_interface_reused_test.go:53 +0x47c
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/discovery.go:80 +0x2c
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:261 +0x208
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:110 +0x164
  github.com/jtolds/gls.(*ContextManager).SetValues.func1(0x0)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:97 +0x4dc
  github.com/jtolds/gls.EnsureGoroutineId.func1()
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/gid.go:24 +0x38
  github.com/jtolds/gls._m(0x0, 0x1400000daa0)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/stack_tags.go:108 +0x38
  github.com/jtolds/gls.github_com_jtolds_gls_markS(0x0, 0x1400000daa0)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/stack_tags.go:56 +0x28
  github.com/jtolds/gls.addStackTag(0x0, 0x1400000daa0)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/stack_tags.go:49 +0x30
  github.com/jtolds/gls.EnsureGoroutineId(0x140000ff800)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/gid.go:24 +0x150
  github.com/jtolds/gls.(*ContextManager).SetValues(0x14000056540, 0x140000ff7a0, 0x14000120620)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:63 +0x230
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:105 +0x350
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/doc.go:75 +0x5c
  github.com/agiledragon/gomonkey/v2/test.TestApplyInterfaceReused(0x14000183380)
        /bak/gomonkey/test/apply_interface_reused_test.go:14 +0x134
  testing.tRunner(0x14000183380, 0x104eab140)
        /.g/versions/1.18.10/src/testing/testing.go:1439 +0x178
  created by testing.(*T).Run
        /.g/versions/1.18.10/src/testing/testing.go:1486 +0x548

  goroutine 1 [chan receive]:
  testing.(*T).Run(0x14000183380, {0x104e3cbe4, 0x18}, 0x104eab140)
        /.g/versions/1.18.10/src/testing/testing.go:1487 +0x568
  testing.runTests.func1(0x14000132000)
        /.g/versions/1.18.10/src/testing/testing.go:1839 +0xa8
  testing.tRunner(0x14000132000, 0x1400007b9d8)
        /.g/versions/1.18.10/src/testing/testing.go:1439 +0x178
  testing.runTests(0x1400000c090, {0x104fcb820, 0xe, 0xe}, {0xc153d5e9ce398a60, 0x8bb2dd5af7, 0x104fcfb80})
        /.g/versions/1.18.10/src/testing/testing.go:1837 +0x414
  testing.(*M).Run(0x140001041e0)
        /.g/versions/1.18.10/src/testing/testing.go:1719 +0x954
  main.main()
        _testmain.go:73 +0x8c

122 total assertions

--- FAIL: TestApplyInterfaceReused (0.00s)
=== RUN   TestApplyMethodFunc

  TestApplyMethodFunc 
    for succ Slice: Add elem: 1 succ
✔Slice: Add elem: 1 already exist
✘
    for already exist Slice: Add elem: 2 succ
✔Slice: Add elem: 1 already exist
✔Slice: Remove elem: 2 succ
✔✘
    two methods Slice: Add elem: 3 succ
✔Slice: Add elem: 2 succ
✘Slice: Remove elem: 3 succ

    one func and one method Slice: Add elem: 4 succ
✔✘Slice: Remove elem: 4 succ

    for variadic method Slice: Append elem: [1 2 3] succ
✔✔✔

Failures:

  * /bak/gomonkey/test/apply_method_func_test.go 
  Line 27:
  Expected: '<nil>'
  Actual:   'elem already exist'
  (Should be equal)
  goroutine 26 [running]:
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/reporting/reports.go:143 +0x50
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/reporting/reports.go:103 +0x98
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:176 +0x8c
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/doc.go:125 +0x58
  github.com/agiledragon/gomonkey/v2/test.TestApplyMethodFunc.func1.1()
        /bak/gomonkey/test/apply_method_func_test.go:27 +0x22c
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/discovery.go:80 +0x2c
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:261 +0x208
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:163 +0x60
  github.com/jtolds/gls.(*ContextManager).SetValues.func1(0x0)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:97 +0x4dc
  github.com/jtolds/gls.EnsureGoroutineId(0x1400015e450)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/gid.go:19 +0x58
  github.com/jtolds/gls.(*ContextManager).SetValues(0x14000056540, 0x1400015e3f0, 0x1400000ddb8)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:63 +0x230
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:162 +0x63c
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/doc.go:77 +0x48
  github.com/agiledragon/gomonkey/v2/test.TestApplyMethodFunc.func1()
        /bak/gomonkey/test/apply_method_func_test.go:19 +0x120
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/discovery.go:80 +0x2c
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:261 +0x208
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:110 +0x164
  github.com/jtolds/gls.(*ContextManager).SetValues.func1(0x0)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:97 +0x4dc
  github.com/jtolds/gls.EnsureGoroutineId.func1()
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/gid.go:24 +0x38
  github.com/jtolds/gls._m(0x0, 0x1400000dd88)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/stack_tags.go:108 +0x38
  github.com/jtolds/gls.github_com_jtolds_gls_markS(0x0, 0x1400000dd88)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/stack_tags.go:56 +0x28
  github.com/jtolds/gls.addStackTag(0x0, 0x1400000dd88)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/stack_tags.go:49 +0x30
  github.com/jtolds/gls.EnsureGoroutineId(0x1400015e300)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/gid.go:24 +0x150
  github.com/jtolds/gls.(*ContextManager).SetValues(0x14000056540, 0x1400015e2a0, 0x14000120800)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:63 +0x230
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:105 +0x350
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/doc.go:75 +0x5c
  github.com/agiledragon/gomonkey/v2/test.TestApplyMethodFunc(0x14000183a00)
        /bak/gomonkey/test/apply_method_func_test.go:18 +0x1a0
  testing.tRunner(0x14000183a00, 0x104eab1b0)
        /.g/versions/1.18.10/src/testing/testing.go:1439 +0x178
  created by testing.(*T).Run
        /.g/versions/1.18.10/src/testing/testing.go:1486 +0x548

  * /bak/gomonkey/test/apply_method_func_test.go 
  Line 44:
  Expected: '0'
  Actual:   '1'
  (Should be equal)
  goroutine 26 [running]:
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/reporting/reports.go:143 +0x50
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/reporting/reports.go:103 +0x98
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:176 +0x8c
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/doc.go:125 +0x58
  github.com/agiledragon/gomonkey/v2/test.TestApplyMethodFunc.func1.2()
        /bak/gomonkey/test/apply_method_func_test.go:44 +0x3d0
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/discovery.go:80 +0x2c
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:261 +0x208
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:163 +0x60
  github.com/jtolds/gls.(*ContextManager).SetValues.func1(0x0)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:97 +0x4dc
  github.com/jtolds/gls.EnsureGoroutineId(0x1400015e840)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/gid.go:19 +0x58
  github.com/jtolds/gls.(*ContextManager).SetValues(0x14000056540, 0x1400015e7e0, 0x1400000def0)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:63 +0x230
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:162 +0x63c
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/doc.go:77 +0x48
  github.com/agiledragon/gomonkey/v2/test.TestApplyMethodFunc.func1()
        /bak/gomonkey/test/apply_method_func_test.go:33 +0x210
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/discovery.go:80 +0x2c
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:261 +0x208
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:110 +0x164
  github.com/jtolds/gls.(*ContextManager).SetValues.func1(0x0)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:97 +0x4dc
  github.com/jtolds/gls.EnsureGoroutineId.func1()
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/gid.go:24 +0x38
  github.com/jtolds/gls._m(0x0, 0x1400000dd88)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/stack_tags.go:108 +0x38
  github.com/jtolds/gls.github_com_jtolds_gls_markS(0x0, 0x1400000dd88)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/stack_tags.go:56 +0x28
  github.com/jtolds/gls.addStackTag(0x0, 0x1400000dd88)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/stack_tags.go:49 +0x30
  github.com/jtolds/gls.EnsureGoroutineId(0x1400015e300)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/gid.go:24 +0x150
  github.com/jtolds/gls.(*ContextManager).SetValues(0x14000056540, 0x1400015e2a0, 0x14000120800)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:63 +0x230
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:105 +0x350
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/doc.go:75 +0x5c
  github.com/agiledragon/gomonkey/v2/test.TestApplyMethodFunc(0x14000183a00)
        /bak/gomonkey/test/apply_method_func_test.go:18 +0x1a0
  testing.tRunner(0x14000183a00, 0x104eab1b0)
        /.g/versions/1.18.10/src/testing/testing.go:1439 +0x178
  created by testing.(*T).Run
        /.g/versions/1.18.10/src/testing/testing.go:1486 +0x548

  * /bak/gomonkey/test/apply_method_func_test.go 
  Line 59:
  Expected: 'elem already exist'
  Actual:   '<nil>'
  (Should be equal)
  goroutine 26 [running]:
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/reporting/reports.go:143 +0x50
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/reporting/reports.go:103 +0x98
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:176 +0x8c
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/doc.go:125 +0x58
  github.com/agiledragon/gomonkey/v2/test.TestApplyMethodFunc.func1.3()
        /bak/gomonkey/test/apply_method_func_test.go:59 +0x300
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/discovery.go:80 +0x2c
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:261 +0x208
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:163 +0x60
  github.com/jtolds/gls.(*ContextManager).SetValues.func1(0x0)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:97 +0x4dc
  github.com/jtolds/gls.EnsureGoroutineId(0x1400015eab0)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/gid.go:19 +0x58
  github.com/jtolds/gls.(*ContextManager).SetValues(0x14000056540, 0x1400015ea50, 0x14000338030)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:63 +0x230
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:162 +0x63c
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/doc.go:77 +0x48
  github.com/agiledragon/gomonkey/v2/test.TestApplyMethodFunc.func1()
        /bak/gomonkey/test/apply_method_func_test.go:47 +0x300
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/discovery.go:80 +0x2c
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:261 +0x208
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:110 +0x164
  github.com/jtolds/gls.(*ContextManager).SetValues.func1(0x0)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:97 +0x4dc
  github.com/jtolds/gls.EnsureGoroutineId.func1()
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/gid.go:24 +0x38
  github.com/jtolds/gls._m(0x0, 0x1400000dd88)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/stack_tags.go:108 +0x38
  github.com/jtolds/gls.github_com_jtolds_gls_markS(0x0, 0x1400000dd88)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/stack_tags.go:56 +0x28
  github.com/jtolds/gls.addStackTag(0x0, 0x1400000dd88)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/stack_tags.go:49 +0x30
  github.com/jtolds/gls.EnsureGoroutineId(0x1400015e300)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/gid.go:24 +0x150
  github.com/jtolds/gls.(*ContextManager).SetValues(0x14000056540, 0x1400015e2a0, 0x14000120800)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:63 +0x230
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:105 +0x350
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/doc.go:75 +0x5c
  github.com/agiledragon/gomonkey/v2/test.TestApplyMethodFunc(0x14000183a00)
        /bak/gomonkey/test/apply_method_func_test.go:18 +0x1a0
  testing.tRunner(0x14000183a00, 0x104eab1b0)
        /.g/versions/1.18.10/src/testing/testing.go:1439 +0x178
  created by testing.(*T).Run
        /.g/versions/1.18.10/src/testing/testing.go:1486 +0x548

  * /bak/gomonkey/test/apply_method_func_test.go 
  Line 78:
  Expected: '<nil>'
  Actual:   'any'
  (Should be equal)
  goroutine 26 [running]:
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/reporting/reports.go:143 +0x50
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/reporting/reports.go:103 +0x98
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:176 +0x8c
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/doc.go:125 +0x58
  github.com/agiledragon/gomonkey/v2/test.TestApplyMethodFunc.func1.4()
        /bak/gomonkey/test/apply_method_func_test.go:78 +0x350
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/discovery.go:80 +0x2c
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:261 +0x208
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:163 +0x60
  github.com/jtolds/gls.(*ContextManager).SetValues.func1(0x0)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:97 +0x4dc
  github.com/jtolds/gls.EnsureGoroutineId(0x1400015ed80)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/gid.go:19 +0x58
  github.com/jtolds/gls.(*ContextManager).SetValues(0x14000056540, 0x1400015ed20, 0x14000338138)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:63 +0x230
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:162 +0x63c
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/doc.go:77 +0x48
  github.com/agiledragon/gomonkey/v2/test.TestApplyMethodFunc.func1()
        /bak/gomonkey/test/apply_method_func_test.go:66 +0x3f0
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/discovery.go:80 +0x2c
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:261 +0x208
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:110 +0x164
  github.com/jtolds/gls.(*ContextManager).SetValues.func1(0x0)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:97 +0x4dc
  github.com/jtolds/gls.EnsureGoroutineId.func1()
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/gid.go:24 +0x38
  github.com/jtolds/gls._m(0x0, 0x1400000dd88)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/stack_tags.go:108 +0x38
  github.com/jtolds/gls.github_com_jtolds_gls_markS(0x0, 0x1400000dd88)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/stack_tags.go:56 +0x28
  github.com/jtolds/gls.addStackTag(0x0, 0x1400000dd88)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/stack_tags.go:49 +0x30
  github.com/jtolds/gls.EnsureGoroutineId(0x1400015e300)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/gid.go:24 +0x150
  github.com/jtolds/gls.(*ContextManager).SetValues(0x14000056540, 0x1400015e2a0, 0x14000120800)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:63 +0x230
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:105 +0x350
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/doc.go:75 +0x5c
  github.com/agiledragon/gomonkey/v2/test.TestApplyMethodFunc(0x14000183a00)
        /bak/gomonkey/test/apply_method_func_test.go:18 +0x1a0
  testing.tRunner(0x14000183a00, 0x104eab1b0)
        /.g/versions/1.18.10/src/testing/testing.go:1439 +0x178
  created by testing.(*T).Run
        /.g/versions/1.18.10/src/testing/testing.go:1486 +0x548

135 total assertions

--- FAIL: TestApplyMethodFunc (0.00s)
=== RUN   TestApplyMethodReturn

  TestApplyMethodReturn 
    declares the values to be returned ✔✔✔✔✔✔✔✔✔✔✔✔✔✔✔✔✔✔✔✔✔✘

Failures:

  * /bak/gomonkey/test/apply_method_return_test.go 
  Line 34:
  Expected: 'hello golang'
  Actual:   'hello cpp'
  (Should be equal)
  goroutine 27 [running]:
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/reporting/reports.go:143 +0x50
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/reporting/reports.go:103 +0x98
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:176 +0x8c
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/doc.go:125 +0x58
  github.com/agiledragon/gomonkey/v2/test.TestApplyMethodReturn.func1.1()
        /bak/gomonkey/test/apply_method_return_test.go:34 +0x60c
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/discovery.go:80 +0x2c
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:261 +0x208
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:163 +0x60
  github.com/jtolds/gls.(*ContextManager).SetValues.func1(0x0)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:97 +0x4dc
  github.com/jtolds/gls.EnsureGoroutineId(0x1400015f5c0)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/gid.go:19 +0x58
  github.com/jtolds/gls.(*ContextManager).SetValues(0x14000056540, 0x1400015f560, 0x140003383a8)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:63 +0x230
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:162 +0x63c
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/doc.go:77 +0x48
  github.com/agiledragon/gomonkey/v2/test.TestApplyMethodReturn.func1()
        /bak/gomonkey/test/apply_method_return_test.go:18 +0xe4
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/discovery.go:80 +0x2c
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:261 +0x208
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:110 +0x164
  github.com/jtolds/gls.(*ContextManager).SetValues.func1(0x0)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:97 +0x4dc
  github.com/jtolds/gls.EnsureGoroutineId.func1()
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/gid.go:24 +0x38
  github.com/jtolds/gls._m(0x0, 0x14000338390)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/stack_tags.go:108 +0x38
  github.com/jtolds/gls.github_com_jtolds_gls_markS(0x0, 0x14000338390)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/stack_tags.go:56 +0x28
  github.com/jtolds/gls.addStackTag(0x0, 0x14000338390)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/stack_tags.go:49 +0x30
  github.com/jtolds/gls.EnsureGoroutineId(0x1400015f470)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/gid.go:24 +0x150
  github.com/jtolds/gls.(*ContextManager).SetValues(0x14000056540, 0x1400015f410, 0x14000120a60)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:63 +0x230
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:105 +0x350
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/doc.go:75 +0x5c
  github.com/agiledragon/gomonkey/v2/test.TestApplyMethodReturn(0x14000202820)
        /bak/gomonkey/test/apply_method_return_test.go:17 +0x134
  testing.tRunner(0x14000202820, 0x104eab1b8)
        /.g/versions/1.18.10/src/testing/testing.go:1439 +0x178
  created by testing.(*T).Run
        /.g/versions/1.18.10/src/testing/testing.go:1486 +0x548

157 total assertions

--- FAIL: TestApplyMethodReturn (0.00s)
=== RUN   TestApplyMethodSeq

  TestApplyMethodSeq 
    default times is 1 ✔✔✔✔✔✔
    retry succ util the third times ✔✔✔✔
    batch operations failed on the third time ✔✔✔✔✔

172 total assertions

--- PASS: TestApplyMethodSeq (0.00s)
=== RUN   TestApplyMethod

  TestApplyMethod 
    for succ Slice: Add elem: 1 succ
✔Slice: Add elem: 1 already exist
✘
    for already exist Slice: Add elem: 2 succ
✔Slice: Add elem: 1 already exist
✔Slice: Remove elem: 2 succ
✔✘
    two methods Slice: Add elem: 3 succ
✔Slice: Add elem: 2 succ
✘Slice: Remove elem: 3 succ

    one func and one method Slice: Add elem: 4 succ
✔✔✔✔✘Slice: Remove elem: 4 succ

Failures:

  * /bak/gomonkey/test/apply_method_test.go 
  Line 24:
  Expected: '<nil>'
  Actual:   'elem already exist'
  (Should be equal)
  goroutine 29 [running]:
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/reporting/reports.go:143 +0x50
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/reporting/reports.go:103 +0x98
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:176 +0x8c
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/doc.go:125 +0x58
  github.com/agiledragon/gomonkey/v2/test.TestApplyMethod.func1.1()
        /bak/gomonkey/test/apply_method_test.go:24 +0x22c
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/discovery.go:80 +0x2c
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:261 +0x208
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:163 +0x60
  github.com/jtolds/gls.(*ContextManager).SetValues.func1(0x0)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:97 +0x4dc
  github.com/jtolds/gls.EnsureGoroutineId(0x1400039e990)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/gid.go:19 +0x58
  github.com/jtolds/gls.(*ContextManager).SetValues(0x14000056540, 0x1400039e930, 0x14000338ba0)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:63 +0x230
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:162 +0x63c
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/doc.go:77 +0x48
  github.com/agiledragon/gomonkey/v2/test.TestApplyMethod.func1()
        /bak/gomonkey/test/apply_method_test.go:16 +0x120
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/discovery.go:80 +0x2c
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:261 +0x208
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:110 +0x164
  github.com/jtolds/gls.(*ContextManager).SetValues.func1(0x0)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:97 +0x4dc
  github.com/jtolds/gls.EnsureGoroutineId.func1()
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/gid.go:24 +0x38
  github.com/jtolds/gls._m(0x0, 0x14000338b70)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/stack_tags.go:108 +0x38
  github.com/jtolds/gls.github_com_jtolds_gls_markS(0x0, 0x14000338b70)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/stack_tags.go:56 +0x28
  github.com/jtolds/gls.addStackTag(0x0, 0x14000338b70)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/stack_tags.go:49 +0x30
  github.com/jtolds/gls.EnsureGoroutineId(0x1400039e840)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/gid.go:24 +0x150
  github.com/jtolds/gls.(*ContextManager).SetValues(0x14000056540, 0x1400039e7e0, 0x14000120de0)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:63 +0x230
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:105 +0x350
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/doc.go:75 +0x5c
  github.com/agiledragon/gomonkey/v2/test.TestApplyMethod(0x140002031e0)
        /bak/gomonkey/test/apply_method_test.go:14 +0x1a0
  testing.tRunner(0x140002031e0, 0x104eab1c8)
        /.g/versions/1.18.10/src/testing/testing.go:1439 +0x178
  created by testing.(*T).Run
        /.g/versions/1.18.10/src/testing/testing.go:1486 +0x548

  * /bak/gomonkey/test/apply_method_test.go 
  Line 41:
  Expected: '0'
  Actual:   '1'
  (Should be equal)
  goroutine 29 [running]:
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/reporting/reports.go:143 +0x50
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/reporting/reports.go:103 +0x98
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:176 +0x8c
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/doc.go:125 +0x58
  github.com/agiledragon/gomonkey/v2/test.TestApplyMethod.func1.2()
        /bak/gomonkey/test/apply_method_test.go:41 +0x3d0
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/discovery.go:80 +0x2c
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:261 +0x208
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:163 +0x60
  github.com/jtolds/gls.(*ContextManager).SetValues.func1(0x0)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:97 +0x4dc
  github.com/jtolds/gls.EnsureGoroutineId(0x1400039ec30)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/gid.go:19 +0x58
  github.com/jtolds/gls.(*ContextManager).SetValues(0x14000056540, 0x1400039ebd0, 0x14000338c90)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:63 +0x230
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:162 +0x63c
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/doc.go:77 +0x48
  github.com/agiledragon/gomonkey/v2/test.TestApplyMethod.func1()
        /bak/gomonkey/test/apply_method_test.go:30 +0x210
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/discovery.go:80 +0x2c
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:261 +0x208
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:110 +0x164
  github.com/jtolds/gls.(*ContextManager).SetValues.func1(0x0)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:97 +0x4dc
  github.com/jtolds/gls.EnsureGoroutineId.func1()
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/gid.go:24 +0x38
  github.com/jtolds/gls._m(0x0, 0x14000338b70)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/stack_tags.go:108 +0x38
  github.com/jtolds/gls.github_com_jtolds_gls_markS(0x0, 0x14000338b70)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/stack_tags.go:56 +0x28
  github.com/jtolds/gls.addStackTag(0x0, 0x14000338b70)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/stack_tags.go:49 +0x30
  github.com/jtolds/gls.EnsureGoroutineId(0x1400039e840)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/gid.go:24 +0x150
  github.com/jtolds/gls.(*ContextManager).SetValues(0x14000056540, 0x1400039e7e0, 0x14000120de0)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:63 +0x230
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:105 +0x350
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/doc.go:75 +0x5c
  github.com/agiledragon/gomonkey/v2/test.TestApplyMethod(0x140002031e0)
        /bak/gomonkey/test/apply_method_test.go:14 +0x1a0
  testing.tRunner(0x140002031e0, 0x104eab1c8)
        /.g/versions/1.18.10/src/testing/testing.go:1439 +0x178
  created by testing.(*T).Run
        /.g/versions/1.18.10/src/testing/testing.go:1486 +0x548

  * /bak/gomonkey/test/apply_method_test.go 
  Line 56:
  Expected: 'elem already exist'
  Actual:   '<nil>'
  (Should be equal)
  goroutine 29 [running]:
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/reporting/reports.go:143 +0x50
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/reporting/reports.go:103 +0x98
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:176 +0x8c
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/doc.go:125 +0x58
  github.com/agiledragon/gomonkey/v2/test.TestApplyMethod.func1.3()
        /bak/gomonkey/test/apply_method_test.go:56 +0x300
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/discovery.go:80 +0x2c
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:261 +0x208
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:163 +0x60
  github.com/jtolds/gls.(*ContextManager).SetValues.func1(0x0)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:97 +0x4dc
  github.com/jtolds/gls.EnsureGoroutineId(0x1400039ee40)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/gid.go:19 +0x58
  github.com/jtolds/gls.(*ContextManager).SetValues(0x14000056540, 0x1400039ede0, 0x14000338db0)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:63 +0x230
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:162 +0x63c
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/doc.go:77 +0x48
  github.com/agiledragon/gomonkey/v2/test.TestApplyMethod.func1()
        /bak/gomonkey/test/apply_method_test.go:44 +0x300
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/discovery.go:80 +0x2c
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:261 +0x208
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:110 +0x164
  github.com/jtolds/gls.(*ContextManager).SetValues.func1(0x0)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:97 +0x4dc
  github.com/jtolds/gls.EnsureGoroutineId.func1()
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/gid.go:24 +0x38
  github.com/jtolds/gls._m(0x0, 0x14000338b70)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/stack_tags.go:108 +0x38
  github.com/jtolds/gls.github_com_jtolds_gls_markS(0x0, 0x14000338b70)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/stack_tags.go:56 +0x28
  github.com/jtolds/gls.addStackTag(0x0, 0x14000338b70)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/stack_tags.go:49 +0x30
  github.com/jtolds/gls.EnsureGoroutineId(0x1400039e840)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/gid.go:24 +0x150
  github.com/jtolds/gls.(*ContextManager).SetValues(0x14000056540, 0x1400039e7e0, 0x14000120de0)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:63 +0x230
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:105 +0x350
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/doc.go:75 +0x5c
  github.com/agiledragon/gomonkey/v2/test.TestApplyMethod(0x140002031e0)
        /bak/gomonkey/test/apply_method_test.go:14 +0x1a0
  testing.tRunner(0x140002031e0, 0x104eab1c8)
        /.g/versions/1.18.10/src/testing/testing.go:1439 +0x178
  created by testing.(*T).Run
        /.g/versions/1.18.10/src/testing/testing.go:1486 +0x548

  * /bak/gomonkey/test/apply_method_test.go 
  Line 79:
  Expected: '1'
  Actual:   '3'
  (Should be equal)
  goroutine 29 [running]:
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/reporting/reports.go:143 +0x50
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/reporting/reports.go:103 +0x98
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:176 +0x8c
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/doc.go:125 +0x58
  github.com/agiledragon/gomonkey/v2/test.TestApplyMethod.func1.4()
        /bak/gomonkey/test/apply_method_test.go:79 +0x5b0
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/discovery.go:80 +0x2c
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:261 +0x208
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:163 +0x60
  github.com/jtolds/gls.(*ContextManager).SetValues.func1(0x0)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:97 +0x4dc
  github.com/jtolds/gls.EnsureGoroutineId(0x1400039f050)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/gid.go:19 +0x58
  github.com/jtolds/gls.(*ContextManager).SetValues(0x14000056540, 0x1400039eff0, 0x14000338ea0)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:63 +0x230
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:162 +0x63c
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/doc.go:77 +0x48
  github.com/agiledragon/gomonkey/v2/test.TestApplyMethod.func1()
        /bak/gomonkey/test/apply_method_test.go:63 +0x3f0
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/discovery.go:80 +0x2c
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:261 +0x208
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:110 +0x164
  github.com/jtolds/gls.(*ContextManager).SetValues.func1(0x0)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:97 +0x4dc
  github.com/jtolds/gls.EnsureGoroutineId.func1()
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/gid.go:24 +0x38
  github.com/jtolds/gls._m(0x0, 0x14000338b70)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/stack_tags.go:108 +0x38
  github.com/jtolds/gls.github_com_jtolds_gls_markS(0x0, 0x14000338b70)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/stack_tags.go:56 +0x28
  github.com/jtolds/gls.addStackTag(0x0, 0x14000338b70)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/stack_tags.go:49 +0x30
  github.com/jtolds/gls.EnsureGoroutineId(0x1400039e840)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/gid.go:24 +0x150
  github.com/jtolds/gls.(*ContextManager).SetValues(0x14000056540, 0x1400039e7e0, 0x14000120de0)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:63 +0x230
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:105 +0x350
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/doc.go:75 +0x5c
  github.com/agiledragon/gomonkey/v2/test.TestApplyMethod(0x140002031e0)
        /bak/gomonkey/test/apply_method_test.go:14 +0x1a0
  testing.tRunner(0x140002031e0, 0x104eab1c8)
        /.g/versions/1.18.10/src/testing/testing.go:1439 +0x178
  created by testing.(*T).Run
        /.g/versions/1.18.10/src/testing/testing.go:1486 +0x548

185 total assertions

--- FAIL: TestApplyMethod (0.00s)
=== RUN   TestApplyPrivateMethod

  TestApplyPrivateMethod 
    patch private pointer method in the different package ✔
    patch private value method in the different package ✔
    aaaaaaaaa ✔✔
    repeat patch same method ✔✘

Failures:

  * /bak/gomonkey/test/apply_private_method_test.go 
  Line 64:
  Expected: 'happy'
  Actual:   'unhappy'
  (Should be equal)
  goroutine 30 [running]:
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/reporting/reports.go:143 +0x50
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/reporting/reports.go:103 +0x98
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:176 +0x8c
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/doc.go:125 +0x58
  github.com/agiledragon/gomonkey/v2/test.TestApplyPrivateMethod.func1.4()
        /bak/gomonkey/test/apply_private_method_test.go:64 +0x1ec
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/discovery.go:80 +0x2c
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:261 +0x208
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:163 +0x60
  github.com/jtolds/gls.(*ContextManager).SetValues.func1(0x0)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:97 +0x4dc
  github.com/jtolds/gls.EnsureGoroutineId(0x1400039f950)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/gid.go:19 +0x58
  github.com/jtolds/gls.(*ContextManager).SetValues(0x14000056540, 0x1400039f8f0, 0x140003390f8)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:63 +0x230
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:162 +0x63c
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/doc.go:77 +0x48
  github.com/agiledragon/gomonkey/v2/test.TestApplyPrivateMethod.func1()
        /bak/gomonkey/test/apply_private_method_test.go:52 +0x1ec
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/discovery.go:80 +0x2c
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:261 +0x208
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:110 +0x164
  github.com/jtolds/gls.(*ContextManager).SetValues.func1(0x0)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:97 +0x4dc
  github.com/jtolds/gls.EnsureGoroutineId.func1()
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/gid.go:24 +0x38
  github.com/jtolds/gls._m(0x0, 0x14000338fa8)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/stack_tags.go:108 +0x38
  github.com/jtolds/gls.github_com_jtolds_gls_markS(0x0, 0x14000338fa8)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/stack_tags.go:56 +0x28
  github.com/jtolds/gls.addStackTag(0x0, 0x14000338fa8)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/stack_tags.go:49 +0x30
  github.com/jtolds/gls.EnsureGoroutineId(0x1400039f2f0)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/gid.go:24 +0x150
  github.com/jtolds/gls.(*ContextManager).SetValues(0x14000056540, 0x1400039f290, 0x14000120fa0)
        /go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:63 +0x230
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:105 +0x350
        /go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/doc.go:75 +0x5c
  github.com/agiledragon/gomonkey/v2/test.TestApplyPrivateMethod(0x14000203a00)
        /bak/gomonkey/test/apply_private_method_test.go:16 +0xdc
  testing.tRunner(0x14000203a00, 0x104eab220)
        /.g/versions/1.18.10/src/testing/testing.go:1439 +0x178
  created by testing.(*T).Run
        /.g/versions/1.18.10/src/testing/testing.go:1486 +0x548

191 total assertions

--- FAIL: TestApplyPrivateMethod (0.00s)
=== RUN   TestPatchPair

  TestPatchPair 
    TestPatchPair ✔✔✔✔✔

196 total assertions

--- PASS: TestPatchPair (0.00s)
FAIL
FAIL    github.com/agiledragon/gomonkey/v2/test 1.156s
FAIL
agiledragon commented 7 months ago

在github上加一个CI是一个好主意,可以提交一个PR,创建一个YAML配置文件

alpha-baby commented 6 months ago

在github上加一个CI是一个好主意,可以提交一个PR,创建一个YAML配置文件

https://github.com/alpha-baby/gomonkey/actions/runs/7149603347/job/19471980795 大佬看看这个为啥 1.20.11 版本编译都不通过,我再本地 linux amd64 1.20.11 都是可以过的

baixiaoshi commented 6 months ago

请问怎么破,现在遇到一样的问题

alpha-baby commented 6 months ago

请问怎么破,现在遇到一样的问题

目前我还不会修,等维护的大佬修吧

1zhangwei1 commented 6 months ago

有解决方案了吗我也遇到了同样的问题