mirror of
https://github.com/status-im/consul.git
synced 2025-01-13 07:14:37 +00:00
Use SIGABRT to get a stack trace when the timeout is hit
This commit is contained in:
parent
8e67d8eaeb
commit
fe2f80c3a1
@ -25,6 +25,7 @@ import (
|
||||
"runtime"
|
||||
"strconv"
|
||||
"strings"
|
||||
"syscall"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
@ -340,7 +341,7 @@ func (s *TestServer) Stop() error {
|
||||
case err := <-waitDone:
|
||||
return err
|
||||
case <-time.After(10 * time.Second):
|
||||
s.cmd.Process.Kill()
|
||||
s.cmd.Process.Signal(syscall.SIGABRT)
|
||||
s.cmd.Wait()
|
||||
return fmt.Errorf("timeout waiting for server to stop gracefully")
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user