The ppc64x builders are failing on the new splice test from CL 113997
but the actual failure is being obscured by a test deadlock.
Change-Id: I7747f88bcdba9776a3c0d2f5066cfec572706108
Reviewed-on: https://go-review.googlesource.com/133417
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
"strconv"
"sync"
"testing"
+ "time"
)
func TestSplice(t *testing.T) {
close(donec)
}()
- return func() { <-donec }, nil
+ return func() {
+ select {
+ case <-donec:
+ case <-time.After(5 * time.Second):
+ log.Printf("killing splice client after 5 second shutdown timeout")
+ cmd.Process.Kill()
+ select {
+ case <-donec:
+ case <-time.After(5 * time.Second):
+ log.Printf("splice client didn't die after 10 seconds")
+ }
+ }
+ }, nil
}
func init() {