CI: try increasing the GOMAXPROCS for unittests (#3414)

This commit is contained in:
Sandy Xu
2023-03-31 16:04:09 +08:00
committed by GitHub
parent dac5976dfc
commit daed6f65b7
5 changed files with 6 additions and 7 deletions

View File

@@ -72,7 +72,7 @@ release:
test:
go test -v -cover -count=1 -timeout=12m ./pkg/... -coverprofile=cov1.out
sudo JFS_GC_SKIPPEDTIME=1 MINIO_ACCESS_KEY=testUser MINIO_SECRET_KEY=testUserPassword go test -v -count=1 -cover -timeout=8m ./cmd/... -coverprofile=cov2.out -coverpkg=./pkg/...,./cmd/...
sudo JFS_GC_SKIPPEDTIME=1 MINIO_ACCESS_KEY=testUser MINIO_SECRET_KEY=testUserPassword GOMAXPROCS=8 go test -v -count=1 -cover -timeout=8m ./cmd/... -coverprofile=cov2.out -coverpkg=./pkg/...,./cmd/...
test.fdb:
go test -v -cover -count=1 -timeout=4m ./pkg/meta/ -tags fdb -run=TestFdb -coverprofile=cov3.out

View File

@@ -23,7 +23,6 @@ import (
)
func TestFsck(t *testing.T) {
t.Skipf("this test is not stable, skip it")
mountTemp(t, nil, nil, nil)
defer umountTemp(t)

View File

@@ -27,7 +27,6 @@ import (
)
func TestInfo(t *testing.T) {
t.Skipf("this test is not stable, skip it")
Convey("TestInfo", t, func() {
Convey("TestInfo", func() {
tmpFile, err := os.CreateTemp("/tmp", "")
@@ -52,7 +51,7 @@ func TestInfo(t *testing.T) {
}
}
if err = Main([]string{"", "info", fmt.Sprintf("%s/dir1", testMountPoint)}); err != nil {
if err = Main([]string{"", "info", fmt.Sprintf("%s/dir1", testMountPoint), "--strict"}); err != nil {
t.Fatalf("info failed: %s", err)
}
content, err := os.ReadFile(tmpFile.Name())

View File

@@ -23,6 +23,7 @@ import (
"os"
"strconv"
"strings"
"sync"
"syscall"
"github.com/erikdubbelboer/gspt"
@@ -36,6 +37,7 @@ import (
var logger = utils.GetLogger("juicefs")
var debugAgent string
var debugAgentOnce sync.Once
func Main(args []string) error {
// we have to call this because gspt removes all arguments
@@ -263,12 +265,12 @@ func setup(c *cli.Context, n int) {
}
if !c.Bool("no-agent") {
go func() {
go debugAgentOnce.Do(func() {
for port := 6060; port < 6100; port++ {
debugAgent = fmt.Sprintf("127.0.0.1:%d", port)
_ = http.ListenAndServe(debugAgent, nil)
}
}()
})
}
if c.IsSet("pyroscope") {

View File

@@ -27,7 +27,6 @@ import (
)
func TestWarmup(t *testing.T) {
t.Skipf("this test is not stable, skip it")
mountTemp(t, nil, nil, nil)
defer umountTemp(t)