mirror of
https://github.com/shirou/gopsutil.git
synced 2025-04-26 13:48:59 +08:00
fix test pid to use os.Getpid()
This commit is contained in:
parent
400054f2f0
commit
887f7514a4
@ -5,6 +5,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"runtime"
|
"runtime"
|
||||||
"testing"
|
"testing"
|
||||||
|
"os"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Test_Pids(t *testing.T) {
|
func Test_Pids(t *testing.T) {
|
||||||
@ -49,7 +50,7 @@ func Test_NewProcess(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func Test_Process_memory_maps(t *testing.T) {
|
func Test_Process_memory_maps(t *testing.T) {
|
||||||
check_pid := 19472
|
check_pid := os.Getpid()
|
||||||
if runtime.GOOS == "windows" {
|
if runtime.GOOS == "windows" {
|
||||||
check_pid = 0
|
check_pid = 0
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user