Skip to content

Commit

Permalink
Fix Test: Update the deadline since small deadlines are prone to flak…
Browse files Browse the repository at this point in the history
…es on Travis. (grpc#1932)
  • Loading branch information
MakMukhi authored Mar 20, 2018
1 parent 2249df6 commit 031ee13
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions clientconn_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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)
Expand Down

0 comments on commit 031ee13

Please sign in to comment.