Browse Source

try another way to kill process on windows

Darien Raymond 7 năm trước cách đây
mục cha
commit
4c798584ff
1 tập tin đã thay đổi với 5 bổ sung1 xóa
  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()