Open xulongfei opened 1 month ago
Describe the bug
环境: model: Macos M1 Pro version: 14.4.1 go1.21.5 darwin/arm64 mockey:1.2.10
跑mockey自己的单测,失败: Failures:
/Users/xlf/Project/src/github.com/mockey/internal/monkey/patch_test.go Line 45: Expected: '0' Actual: '2' (Should be equal) goroutine 18 [running]: /Users/xlf/go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/reporting/reports.go:143 +0x50 /Users/xlf/go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/reporting/reports.go:103 +0xa4 /Users/xlf/go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:176 +0x88 /Users/xlf/go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/doc.go:125 +0x54 github.com/bytedance/mockey/internal/monkey.TestPatchFunc.func1.1() /Users/xlf/Project/src/github.com/mockey/internal/monkey/patch_test.go:45 +0x270 /Users/xlf/go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/discovery.go:80 +0x28 /Users/xlf/go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:261 +0x29c /Users/xlf/go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:163 +0x5c github.com/jtolds/gls.(ContextManager).SetValues.func1(0x0) /Users/xlf/go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:97 +0x4f8 github.com/jtolds/gls.EnsureGoroutineId(0x14000182780) /Users/xlf/go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/gid.go:19 +0x64 github.com/jtolds/gls.(ContextManager).SetValues(0x14000180270, 0x14000182720, 0x1400019e0d8) /Users/xlf/go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:63 +0x254 /Users/xlf/go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:162 +0x688 /Users/xlf/go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/doc.go:77 +0x44 github.com/bytedance/mockey/internal/monkey.TestPatchFunc.func1() /Users/xlf/Project/src/github.com/mockey/internal/monkey/patch_test.go:39 +0xdc /Users/xlf/go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/discovery.go:80 +0x28 /Users/xlf/go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:261 +0x29c /Users/xlf/go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:110 +0x184 github.com/jtolds/gls.(ContextManager).SetValues.func1(0x0) /Users/xlf/go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:97 +0x4f8 github.com/jtolds/gls.EnsureGoroutineId.func1() /Users/xlf/go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/gid.go:24 +0x34 github.com/jtolds/gls._m(0x0, 0x1400019e0c0) /Users/xlf/go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/stack_tags.go:108 +0x34 github.com/jtolds/gls.github_com_jtolds_gls_markS(0x0, 0x1400019e0c0) /Users/xlf/go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/stack_tags.go:56 +0x24 github.com/jtolds/gls.addStackTag(0x0, 0x1400019e0c0) /Users/xlf/go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/stack_tags.go:49 +0x2c github.com/jtolds/gls.EnsureGoroutineId(0x14000182630) /Users/xlf/go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/gid.go:24 +0x180 github.com/jtolds/gls.(ContextManager).SetValues(0x14000180270, 0x140001825d0, 0x140001b6040) /Users/xlf/go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:63 +0x254 /Users/xlf/go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:105 +0x390 /Users/xlf/go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/doc.go:75 +0x58 github.com/bytedance/mockey/internal/monkey.TestPatchFunc(0x1400018c820) /Users/xlf/Project/src/github.com/mockey/internal/monkey/patch_test.go:38 +0x124 testing.tRunner(0x1400018c820, 0x1010def60) /usr/local/go/src/testing/testing.go:1595 +0x1b4 created by testing.(*T).Run in goroutine 1 /usr/local/go/src/testing/testing.go:1648 +0x660
/Users/xlf/Project/src/github.com/mockey/internal/monkey/patch_test.go Line 53: Expected: '0' Actual: '2' (Should be equal) goroutine 18 [running]: /Users/xlf/go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/reporting/reports.go:143 +0x50 /Users/xlf/go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/reporting/reports.go:103 +0xa4 /Users/xlf/go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:176 +0x88 /Users/xlf/go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/doc.go:125 +0x54 github.com/bytedance/mockey/internal/monkey.TestPatchFunc.func1.2() /Users/xlf/Project/src/github.com/mockey/internal/monkey/patch_test.go:53 +0x270 /Users/xlf/go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/discovery.go:80 +0x28 /Users/xlf/go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:261 +0x29c /Users/xlf/go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:163 +0x5c github.com/jtolds/gls.(*ContextManager).SetValues.func1(0x0) /Users/xlf/go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:97 +0x4f8 github.com/jtolds/gls.EnsureGoroutineId(0x14000182e10) A clear and concise description of what the bug is.
Describe the bug
环境: model: Macos M1 Pro version: 14.4.1 go1.21.5 darwin/arm64 mockey:1.2.10
跑mockey自己的单测,失败: Failures:
/Users/xlf/Project/src/github.com/mockey/internal/monkey/patch_test.go Line 45: Expected: '0' Actual: '2' (Should be equal) goroutine 18 [running]: /Users/xlf/go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/reporting/reports.go:143 +0x50 /Users/xlf/go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/reporting/reports.go:103 +0xa4 /Users/xlf/go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:176 +0x88 /Users/xlf/go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/doc.go:125 +0x54 github.com/bytedance/mockey/internal/monkey.TestPatchFunc.func1.1() /Users/xlf/Project/src/github.com/mockey/internal/monkey/patch_test.go:45 +0x270 /Users/xlf/go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/discovery.go:80 +0x28 /Users/xlf/go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:261 +0x29c /Users/xlf/go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:163 +0x5c github.com/jtolds/gls.(ContextManager).SetValues.func1(0x0) /Users/xlf/go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:97 +0x4f8 github.com/jtolds/gls.EnsureGoroutineId(0x14000182780) /Users/xlf/go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/gid.go:19 +0x64 github.com/jtolds/gls.(ContextManager).SetValues(0x14000180270, 0x14000182720, 0x1400019e0d8) /Users/xlf/go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:63 +0x254 /Users/xlf/go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:162 +0x688 /Users/xlf/go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/doc.go:77 +0x44 github.com/bytedance/mockey/internal/monkey.TestPatchFunc.func1() /Users/xlf/Project/src/github.com/mockey/internal/monkey/patch_test.go:39 +0xdc /Users/xlf/go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/discovery.go:80 +0x28 /Users/xlf/go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:261 +0x29c /Users/xlf/go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:110 +0x184 github.com/jtolds/gls.(ContextManager).SetValues.func1(0x0) /Users/xlf/go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:97 +0x4f8 github.com/jtolds/gls.EnsureGoroutineId.func1() /Users/xlf/go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/gid.go:24 +0x34 github.com/jtolds/gls._m(0x0, 0x1400019e0c0) /Users/xlf/go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/stack_tags.go:108 +0x34 github.com/jtolds/gls.github_com_jtolds_gls_markS(0x0, 0x1400019e0c0) /Users/xlf/go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/stack_tags.go:56 +0x24 github.com/jtolds/gls.addStackTag(0x0, 0x1400019e0c0) /Users/xlf/go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/stack_tags.go:49 +0x2c github.com/jtolds/gls.EnsureGoroutineId(0x14000182630) /Users/xlf/go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/gid.go:24 +0x180 github.com/jtolds/gls.(ContextManager).SetValues(0x14000180270, 0x140001825d0, 0x140001b6040) /Users/xlf/go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:63 +0x254 /Users/xlf/go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:105 +0x390 /Users/xlf/go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/doc.go:75 +0x58 github.com/bytedance/mockey/internal/monkey.TestPatchFunc(0x1400018c820) /Users/xlf/Project/src/github.com/mockey/internal/monkey/patch_test.go:38 +0x124 testing.tRunner(0x1400018c820, 0x1010def60) /usr/local/go/src/testing/testing.go:1595 +0x1b4 created by testing.(*T).Run in goroutine 1 /usr/local/go/src/testing/testing.go:1648 +0x660
/Users/xlf/Project/src/github.com/mockey/internal/monkey/patch_test.go Line 53: Expected: '0' Actual: '2' (Should be equal) goroutine 18 [running]: /Users/xlf/go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/reporting/reports.go:143 +0x50 /Users/xlf/go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/reporting/reports.go:103 +0xa4 /Users/xlf/go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:176 +0x88 /Users/xlf/go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/doc.go:125 +0x54 github.com/bytedance/mockey/internal/monkey.TestPatchFunc.func1.2() /Users/xlf/Project/src/github.com/mockey/internal/monkey/patch_test.go:53 +0x270 /Users/xlf/go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/discovery.go:80 +0x28 /Users/xlf/go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:261 +0x29c /Users/xlf/go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:163 +0x5c github.com/jtolds/gls.(*ContextManager).SetValues.func1(0x0) /Users/xlf/go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:97 +0x4f8 github.com/jtolds/gls.EnsureGoroutineId(0x14000182e10) A clear and concise description of what the bug is.