From d41edd396747399499dafcc089c87fd5a6808bc3 Mon Sep 17 00:00:00 2001 From: jinglundong <1683035+jinglundong@users.noreply.github.com> Date: Tue, 11 Jul 2023 13:38:16 -0700 Subject: [PATCH] Extend the deadline of a test context to fix a timeout issue. (#316) --- internal/api_test.go | 2 +- v2/internal/api_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/api_test.go b/internal/api_test.go index 325be5cc..9692b29e 100644 --- a/internal/api_test.go +++ b/internal/api_test.go @@ -235,7 +235,7 @@ func TestAPICallRPCFailure(t *testing.T) { } f.hang = make(chan int) // only for RunSlowly for _, tc := range testCases { - ctx, _ := context.WithTimeout(toContext(c), 100*time.Millisecond) + ctx, _ := context.WithTimeout(toContext(c), 300*time.Millisecond) err := Call(ctx, "errors", tc.method, &basepb.VoidProto{}, &basepb.VoidProto{}) ce, ok := err.(*CallError) if !ok { diff --git a/v2/internal/api_test.go b/v2/internal/api_test.go index 77071db5..073e9bfd 100644 --- a/v2/internal/api_test.go +++ b/v2/internal/api_test.go @@ -212,7 +212,7 @@ func TestAPICallRPCFailure(t *testing.T) { } f.hang = make(chan int) // only for RunSlowly for _, tc := range testCases { - ctx, _ := context.WithTimeout(r.Context(), 100*time.Millisecond) + ctx, _ := context.WithTimeout(r.Context(), 300*time.Millisecond) err := Call(ctx, "errors", tc.method, &basepb.VoidProto{}, &basepb.VoidProto{}) ce, ok := err.(*CallError) if !ok {