Skip to content

Commit

Permalink
wait for lanching process
Browse files Browse the repository at this point in the history
  • Loading branch information
rmatsuoka committed Sep 22, 2023
1 parent 570307e commit 3c929e6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pidfile/pid_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"os"
"os/exec"
"testing"
"time"
)

func TestExistsPid(t *testing.T) {
Expand All @@ -29,6 +30,9 @@ func TestGetCmdName(t *testing.T) {
if err != nil {
t.Fatal(err)
}

// hack: wait for launching process
time.Sleep(time.Millisecond)
pid := cmd.Process.Pid

expected := "sleep"
Expand Down

0 comments on commit 3c929e6

Please sign in to comment.