You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kvrocks.apache.org by GitBox <gi...@apache.org> on 2022/09/20 03:48:27 UTC

[GitHub] [incubator-kvrocks] ColinChamber commented on a diff in pull request #898: Send SIGTERM after finishing the unit test

ColinChamber commented on code in PR #898:
URL: https://github.com/apache/incubator-kvrocks/pull/898#discussion_r974859358


##########
tests/gocase/util/server.go:
##########
@@ -59,8 +60,13 @@ func (s *KvrocksServer) NewTCPClient() *tcpClient {
 }
 
 func (s *KvrocksServer) Close() {
-	require.NoError(s.t, s.cmd.Process.Kill())
-	require.EqualError(s.t, s.cmd.Wait(), "signal: killed")
+	require.NoError(s.t, s.cmd.Process.Signal(syscall.SIGTERM))
+	// A Pod is granted a term to terminate gracefully, which defaults to 30 seconds.

Review Comment:
   Kubernetes will send a SIGTERM signal to the containers in the pod after deleting the pod. It waits for a specified time, called the termination grace period. By default, this is 30 seconds. If the containers are still running after the grace period, they are sent the SIGKILL signal and forcibly removed.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org