Skip to content

Commit 76428d1

Browse files
committed
fixup! fixup! Fix data races in unit tests
1 parent 4c925ae commit 76428d1

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

internal/pkg/agent/application/upgrade/watcher_test.go

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1223,20 +1223,4 @@ func isProcessRunning(t *testing.T, cmd *exec.Cmd) (bool, error) {
12231223
}
12241224

12251225
return isProcessLive(cmd.Process)
1226-
1227-
//// if process is not nil we need to split between unix and non-unix OSes
1228-
//if runtime.GOOS == "windows" {
1229-
// t.Logf("pid %d is running because os.GetProcess returned a not nil process on windows", cmd.Process.Pid)
1230-
// return true, nil
1231-
//} else {
1232-
// // on unix system we always get a process back, we need to do some further checks
1233-
// signalErr := cmd.Process.Signal(syscall.Signal(0))
1234-
// if signalErr != nil {
1235-
// t.Logf("pid %d is not running because Signal(0) returned an error on unix", cmd.Process.Pid)
1236-
// return false, nil //nolint:nilerr // if we receive an error it means that the process is not running, so the check completed without errors
1237-
// } else {
1238-
// t.Logf("pid %d is running because Signal(0) succeeded on unix", cmd.Process.Pid)
1239-
// return true, nil
1240-
// }
1241-
//}
12421226
}

0 commit comments

Comments
 (0)