Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

Commit

Permalink
work around broken pilot signal handling
Browse files Browse the repository at this point in the history
  • Loading branch information
wallrj committed May 21, 2018
1 parent c66ff69 commit 34c30a3
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion test/integration/pilot_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"os"
"os/exec"
"path/filepath"
"syscall"
"testing"
"time"

Expand Down Expand Up @@ -70,10 +71,17 @@ func TestPilotCassandra(t *testing.T) {
require.NoError(t, err)
defer func() {
// XXX: Pilot doesn't respond to SIGKILL
//
err := cmd.Process.Signal(os.Interrupt)
require.NoError(t, err)
err = cmd.Wait()
if exiterr, ok := err.(*exec.ExitError); ok {
if status, ok := exiterr.Sys().(syscall.WaitStatus); ok {
if status.ExitStatus() == 255 {
// XXX Pilot should return 0 if it exits cleanly after a signal.
return
}
}
}
require.NoError(t, err)
}()
select {
Expand Down

0 comments on commit 34c30a3

Please sign in to comment.