From 5832fdfb9b8f4cf6ca8aa5a790d50530bf89cce3 Mon Sep 17 00:00:00 2001 From: kestrelcjx Date: Fri, 29 Oct 2021 20:20:23 +0800 Subject: [PATCH] chore(process): open file in process test case --- process/process_test.go | 3 +++ v3/process/process_test.go | 3 +++ 2 files changed, 6 insertions(+) diff --git a/process/process_test.go b/process/process_test.go index 495af05..7ba027d 100644 --- a/process/process_test.go +++ b/process/process_test.go @@ -657,6 +657,9 @@ func Test_CPUTimes(t *testing.T) { } func Test_OpenFiles(t *testing.T) { + fp, err := os.Open("process_test.go") + defer fp.Close() + pid := os.Getpid() p, err := NewProcess(int32(pid)) skipIfNotImplementedErr(t, err) diff --git a/v3/process/process_test.go b/v3/process/process_test.go index a8b5645..a16b29e 100644 --- a/v3/process/process_test.go +++ b/v3/process/process_test.go @@ -659,6 +659,9 @@ func Test_CPUTimes(t *testing.T) { } func Test_OpenFiles(t *testing.T) { + fp, err := os.Open("process_test.go") + defer fp.Close() + pid := os.Getpid() p, err := NewProcess(int32(pid)) skipIfNotImplementedErr(t, err)