From bbb70222c3d608a24cfdcd30adf75df9f4ad41ad Mon Sep 17 00:00:00 2001 From: Xin Hao Date: Wed, 14 Aug 2024 12:04:54 +0800 Subject: [PATCH 1/5] chore: add Go 1.23 to unit tests --- .github/workflows/tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7c97b982e..54ce8b96e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -23,7 +23,7 @@ jobs: unit-test: strategy: matrix: - version: ["1.20", "1.21", "1.22"] + version: ["1.20", "1.21", "1.22", "1.23"] runs-on: [self-hosted, X64] steps: - uses: actions/checkout@v4 @@ -42,7 +42,7 @@ jobs: ut-windows: strategy: matrix: - version: ["1.20", "1.21", "1.22"] + version: ["1.20", "1.21", "1.22", "1.23"] runs-on: windows-latest steps: - uses: actions/checkout@v4 From 60a8faf822b2350aaf1bfa9e7e25df3590c544cf Mon Sep 17 00:00:00 2001 From: Xin Hao Date: Thu, 15 Aug 2024 15:59:46 +0800 Subject: [PATCH 2/5] fix tests for Go 1.23 rebuil --- .github/workflows/tests.yml | 4 ++-- .gitignore | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 54ce8b96e..a42c01bd9 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -34,7 +34,7 @@ jobs: cache: false # don't use cache for self-hosted runners - name: Unit Test - run: go test -race -covermode=atomic -coverprofile=coverage.txt ./... + run: go test -race -ldflags=-checklinkname=0 -covermode=atomic -coverprofile=coverage.txt ./... - name: Codecov run: bash <(curl -s https://codecov.io/bash) @@ -53,7 +53,7 @@ jobs: cache: false # don't use cache for self-hosted runners - name: Unit Test - run: go test -race -covermode=atomic ./... + run: go test -race -ldflags=-checklinkname=0 -covermode=atomic ./... hz-test-unix: runs-on: [ self-hosted, X64 ] diff --git a/.gitignore b/.gitignore index 02e193d54..338957806 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ .idea .vscode pkg/app/fs.go.hertz.gz +coverage.txt coverage.out From 11f644d93160c25ad24afa0947c2db380bd29a6d Mon Sep 17 00:00:00 2001 From: Xin Hao Date: Fri, 16 Aug 2024 10:46:26 +0800 Subject: [PATCH 3/5] revert --- .github/workflows/tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a42c01bd9..54ce8b96e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -34,7 +34,7 @@ jobs: cache: false # don't use cache for self-hosted runners - name: Unit Test - run: go test -race -ldflags=-checklinkname=0 -covermode=atomic -coverprofile=coverage.txt ./... + run: go test -race -covermode=atomic -coverprofile=coverage.txt ./... - name: Codecov run: bash <(curl -s https://codecov.io/bash) @@ -53,7 +53,7 @@ jobs: cache: false # don't use cache for self-hosted runners - name: Unit Test - run: go test -race -ldflags=-checklinkname=0 -covermode=atomic ./... + run: go test -race -covermode=atomic ./... hz-test-unix: runs-on: [ self-hosted, X64 ] From 800b65de74ddf438a00be572b806148a5e3fc82b Mon Sep 17 00:00:00 2001 From: Xin Hao Date: Tue, 20 Aug 2024 20:41:49 +0800 Subject: [PATCH 4/5] Using mockey v1.2.11 --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 0fd7648ad..4afc4f0ea 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.17 require ( github.com/bytedance/go-tagexpr/v2 v2.9.2 github.com/bytedance/gopkg v0.1.0 - github.com/bytedance/mockey v1.2.10 + github.com/bytedance/mockey v1.2.11 github.com/bytedance/sonic v1.12.0 github.com/cloudwego/netpoll v0.6.2 github.com/fsnotify/fsnotify v1.5.4 diff --git a/go.sum b/go.sum index f20c60c76..dd4ed4641 100644 --- a/go.sum +++ b/go.sum @@ -3,8 +3,8 @@ github.com/bytedance/go-tagexpr/v2 v2.9.2/go.mod h1:5qsx05dYOiUXOUgnQ7w3Oz8BYs2q github.com/bytedance/gopkg v0.0.0-20240507064146-197ded923ae3/go.mod h1:FtQG3YbQG9L/91pbKSw787yBQPutC+457AvDW77fgUQ= github.com/bytedance/gopkg v0.1.0 h1:aAxB7mm1qms4Wz4sp8e1AtKDOeFLtdqvGiUe7aonRJs= github.com/bytedance/gopkg v0.1.0/go.mod h1:FtQG3YbQG9L/91pbKSw787yBQPutC+457AvDW77fgUQ= -github.com/bytedance/mockey v1.2.10 h1:4JlMpkm7HMXmTUtItid+iCu2tm61wvq+ca1X2u7ymzE= -github.com/bytedance/mockey v1.2.10/go.mod h1:bNrUnI1u7+pAc0TYDgPATM+wF2yzHxmNH+iDXg4AOCU= +github.com/bytedance/mockey v1.2.11 h1:xIR17ILTtyeIh0iNTCbtslRnB7/N2o16wQvmtlbMivA= +github.com/bytedance/mockey v1.2.11/go.mod h1:bNrUnI1u7+pAc0TYDgPATM+wF2yzHxmNH+iDXg4AOCU= github.com/bytedance/sonic v1.12.0 h1:YGPgxF9xzaCNvd/ZKdQ28yRovhfMFZQjuk6fKBzZ3ls= github.com/bytedance/sonic v1.12.0/go.mod h1:B8Gt/XvtZ3Fqj+iSKMypzymZxw/FVwgIGKzMzT9r/rk= github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= From d9d7cf91fb980d486b218dcfbf850aebd81f257c Mon Sep 17 00:00:00 2001 From: Xin Hao Date: Tue, 3 Sep 2024 15:36:45 +0800 Subject: [PATCH 5/5] mockey v1.2.12 --- go.mod | 4 ++-- go.sum | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index 4afc4f0ea..cc537142f 100644 --- a/go.mod +++ b/go.mod @@ -5,13 +5,13 @@ go 1.17 require ( github.com/bytedance/go-tagexpr/v2 v2.9.2 github.com/bytedance/gopkg v0.1.0 - github.com/bytedance/mockey v1.2.11 + github.com/bytedance/mockey v1.2.12 github.com/bytedance/sonic v1.12.0 github.com/cloudwego/netpoll v0.6.2 github.com/fsnotify/fsnotify v1.5.4 github.com/tidwall/gjson v1.14.4 golang.org/x/sync v0.0.0-20210220032951-036812b2e83c - golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10 + golang.org/x/sys v0.24.0 google.golang.org/protobuf v1.27.1 ) diff --git a/go.sum b/go.sum index dd4ed4641..446891e45 100644 --- a/go.sum +++ b/go.sum @@ -3,8 +3,8 @@ github.com/bytedance/go-tagexpr/v2 v2.9.2/go.mod h1:5qsx05dYOiUXOUgnQ7w3Oz8BYs2q github.com/bytedance/gopkg v0.0.0-20240507064146-197ded923ae3/go.mod h1:FtQG3YbQG9L/91pbKSw787yBQPutC+457AvDW77fgUQ= github.com/bytedance/gopkg v0.1.0 h1:aAxB7mm1qms4Wz4sp8e1AtKDOeFLtdqvGiUe7aonRJs= github.com/bytedance/gopkg v0.1.0/go.mod h1:FtQG3YbQG9L/91pbKSw787yBQPutC+457AvDW77fgUQ= -github.com/bytedance/mockey v1.2.11 h1:xIR17ILTtyeIh0iNTCbtslRnB7/N2o16wQvmtlbMivA= -github.com/bytedance/mockey v1.2.11/go.mod h1:bNrUnI1u7+pAc0TYDgPATM+wF2yzHxmNH+iDXg4AOCU= +github.com/bytedance/mockey v1.2.12 h1:aeszOmGw8CPX8CRx1DZ/Glzb1yXvhjDh6jdFBNZjsU4= +github.com/bytedance/mockey v1.2.12/go.mod h1:3ZA4MQasmqC87Tw0w7Ygdy7eHIc2xgpZ8Pona5rsYIk= github.com/bytedance/sonic v1.12.0 h1:YGPgxF9xzaCNvd/ZKdQ28yRovhfMFZQjuk6fKBzZ3ls= github.com/bytedance/sonic v1.12.0/go.mod h1:B8Gt/XvtZ3Fqj+iSKMypzymZxw/FVwgIGKzMzT9r/rk= github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= @@ -76,8 +76,9 @@ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10 h1:WIoqL4EROvwiPdUtaip4VcDdpZ4kha7wBWZrbVKCIZg= golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.24.0 h1:Twjiwq9dn6R1fQcyiK+wQyHWfaz/BJB+YIpzU/Cv3Xg= +golang.org/x/sys v0.24.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=