fluid-cloudnative / fluid

Fluid, elastic data abstraction and acceleration for BigData/AI applications in cloud. (Project under CNCF)
https://fluid-cloudnative.github.io/
Apache License 2.0
1.63k stars 956 forks source link

[BUG]fail to exec "go test" in some package #1307

Open yangyuliufeng opened 2 years ago

yangyuliufeng commented 2 years ago

What is your environment(Kubernetes version, Fluid version, etc.) go 1.15、go 1.16

Describe the bug For example, when I exec "go test" in pkg/ddc/goosefs/:

$ cd pkg/ddc/goosefs/
$ go test
2021/12/29 16:34:44 Using CRITICAL_FUSE_POD = false
2021/12/29 16:34:44 Using INIT_PORT_CHECK_ENABLED = false
......
6 total assertions

..
8 total assertions

--- FAIL: TestGetHCFSStatus (0.02s)
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
        panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x15be825]

goroutine 14 [running]:
testing.tRunner.func1.1(0x1766880, 0x25cef90)
        /usr/lib/golang/src/testing/testing.go:1072 +0x30d
testing.tRunner.func1(0xc000426c00)
        /usr/lib/golang/src/testing/testing.go:1075 +0x41a
panic(0x1766880, 0x25cef90)
        /usr/lib/golang/src/runtime/panic.go:969 +0x1b9
github.com/fluid-cloudnative/fluid/pkg/ddc/goosefs.TestGetHCFSStatus(0xc000426c00)
        /root/go/src/github.com/fluid-cloudnative/fluid/pkg/ddc/goosefs/hcfs_test.go:91 +0x4c5
testing.tRunner(0xc000426c00, 0x1a10f48)
        /usr/lib/golang/src/testing/testing.go:1123 +0xef
created by testing.(*T).Run
        /usr/lib/golang/src/testing/testing.go:1168 +0x2b3
exit status 2
FAIL    github.com/fluid-cloudnative/fluid/pkg/ddc/goosefs      0.111s

What you expect to happen:

How to reproduce it

Additional Information

xieydd commented 2 years ago

Can we close the issue.

yangyuliufeng commented 2 years ago

Can we close the issue.

I have edited the isue