Procházet zdrojové kódy

try another way to kill process on windows

Darien Raymond před 7 roky
rodič
revize
4c798584ff
1 změnil soubory, kde provedl 5 přidání a 1 odebrání
  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()