Skip to content

Commit d41edd3

Browse files
authored
Extend the deadline of a test context to fix a timeout issue. (#316)
1 parent f96845d commit d41edd3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

internal/api_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ func TestAPICallRPCFailure(t *testing.T) {
235235
}
236236
f.hang = make(chan int) // only for RunSlowly
237237
for _, tc := range testCases {
238-
ctx, _ := context.WithTimeout(toContext(c), 100*time.Millisecond)
238+
ctx, _ := context.WithTimeout(toContext(c), 300*time.Millisecond)
239239
err := Call(ctx, "errors", tc.method, &basepb.VoidProto{}, &basepb.VoidProto{})
240240
ce, ok := err.(*CallError)
241241
if !ok {

v2/internal/api_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ func TestAPICallRPCFailure(t *testing.T) {
212212
}
213213
f.hang = make(chan int) // only for RunSlowly
214214
for _, tc := range testCases {
215-
ctx, _ := context.WithTimeout(r.Context(), 100*time.Millisecond)
215+
ctx, _ := context.WithTimeout(r.Context(), 300*time.Millisecond)
216216
err := Call(ctx, "errors", tc.method, &basepb.VoidProto{}, &basepb.VoidProto{})
217217
ce, ok := err.(*CallError)
218218
if !ok {

0 commit comments

Comments
 (0)