-
action url: https://github.com/spidernet-io/egressgateway/actions/runs/7769084203
-
在开发的业务场景中,有时候会遇到中间有一个函数中有一个协程,类似下面这种
```go
func testGoroutine() {
go PrintNum()
time.Sleep(time.Second * 1)
}
// PrintNum printnum
func PrintNum() {
for i := 0; i < 5; i++ {
fmt.Print(…
-
### Go version
go1.21.4
### What operating system and processor architecture are you using (`go env`)?
```shell
GO111MODULE=''
GOARCH='amd64'
GOBIN=''
GOCACHE='/home/ccc/.cache/go-build'
GOENV=…
-
````golang
//test/func_test.go
package test
import (
. "github.com/agiledragon/gomonkey"
. "github.com/smartystreets/goconvey/convey"
"testing"
)
func TestGetGroupLastSend(t *testing.T)…
-
以下是测试的代码,我对 `Add` 方法进行了打桩,预期`res`直接返回`0`,但是实际执行结果是`3`,说明没有打桩成功,执行了Add的逻辑
``` go
import (
"testing"
"github.com/agiledragon/gomonkey/v2"
. "github.com/smartystreets/goconvey/convey"
)
fun…
-
## Background
Repo `github.com/radondb/radondb-mysql-kubernetes` depends on `github.com/agiledragon/gomonkey/v2@v2.2.0`.
However, comparing version `v2.2.0` of `github.com/agiledragon/gomonkey` fr…
-
I use gomonkey.ApplyFunc mock a func in for loop, then call it. Why it returns the same result every time.
```go
func Test2(t *testing.T) {
for i := 0; i < 3; i++ {
gomonkey.ApplyFunc(…
-
```bash
$ go get github.com/agiledragon/gomonkey/v2@v2.2.0
go: downloading github.com/agiledragon/gomonkey/v2 v2.2.0
go: github.com/agiledragon/gomonkey/v2@v2.2.0: verifying module: checksum mismat…
-
go: downloading go.opentelemetry.io/otel/sdk v1.21.0
go: finding module for package go.opentelemetry.io/otel/exporters/otlp/internal
go: git.woa.com/qqcms/content_center/chatproxy imports
git.woa.…
zdjjj updated
3 months ago
-
### What would you like to be added?
I'd like to upgrade the UT monkey framework from bou.ke/monkey to bytedance/mockey.
### Why is this needed?
Cause bou.ke/monkey does not support for MacOs…