Parcourir la source

try another way to kill process on windows

Darien Raymond il y a 7 ans
Parent
commit
4c798584ff
1 fichiers modifiés avec 5 ajouts et 1 suppressions
  1. 5 1
      testing/scenarios/common.go

+ 5 - 1
testing/scenarios/common.go

@@ -113,7 +113,11 @@ func CloseAllServers(servers []*exec.Cmd) {
 		Content:  "Closing all servers.",
 	})
 	for _, server := range servers {
-		server.Process.Signal(syscall.SIGTERM)
+		if runtime.GOOS == "windows" {
+			server.Process.Kill()
+		} else {
+			server.Process.Signal(syscall.SIGTERM)
+		}
 	}
 	for _, server := range servers {
 		server.Process.Wait()