Skip to content

Commit

Permalink
test: Print message when tests resume
Browse files Browse the repository at this point in the history
When tests are put on hold after a failure, the user can restart them
with a SIGCONT signal. However, it's often takes a while before any new
output is displayed. This long silence can be disturbing for new users
who may think the SIGCONT signal failed.

This commit prints a simple message to clarify that tests were resumed.
The short sleep before the message display ensures the process is
stopped before the message is displayed.

Signed-off-by: Paul Chaignon <paul@cilium.io>
  • Loading branch information
pchaigno committed Mar 24, 2020
1 parent 0f49fc6 commit d5de568
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/helpers/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,8 @@ func HoldEnvironment(description ...string) {
fmt.Fprintf(os.Stdout, "\n\nPausing test for debug, use vagrant to access test setup.")
fmt.Fprintf(os.Stdout, "\nRun \"kill -SIGCONT %d\" to continue.\n", pid)
unix.Kill(pid, unix.SIGSTOP)
time.Sleep(time.Millisecond)
fmt.Fprintf(os.Stdout, "Test resumed.\n")
}

// Fail is a Ginkgo failure handler which raises a SIGSTOP for the test process
Expand Down

0 comments on commit d5de568

Please sign in to comment.