From 031ee13cfe2f6f9f3ea0bb7d4243cd59780f0355 Mon Sep 17 00:00:00 2001 From: mmukhi Date: Tue, 20 Mar 2018 16:46:10 -0700 Subject: [PATCH] Fix Test: Update the deadline since small deadlines are prone to flakes on Travis. (#1932) --- clientconn_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/clientconn_test.go b/clientconn_test.go index 8dd2bd34..c69cfbe2 100644 --- a/clientconn_test.go +++ b/clientconn_test.go @@ -149,9 +149,9 @@ func TestDialWaitsForServerSettings(t *testing.T) { return } defer conn.Close() - // Sleep so that if the test were to fail it - // will fail more often than not. - time.Sleep(100 * time.Millisecond) + // Sleep for a little bit to make sure that Dial on client + // side blocks until settings are received. + time.Sleep(500 * time.Millisecond) framer := http2.NewFramer(conn, conn) close(sent) if err := framer.WriteSettings(http2.Setting{}); err != nil { @@ -160,7 +160,7 @@ func TestDialWaitsForServerSettings(t *testing.T) { } <-dialDone // Close conn only after dial returns. }() - ctx, cancel := context.WithTimeout(context.Background(), 500*time.Millisecond) + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) defer cancel() client, err := DialContext(ctx, server.Addr().String(), WithInsecure(), WithWaitForHandshake(), WithBlock()) close(dialDone)