Skip to content

Commit

Permalink
Extend the deadline of a test context to fix a timeout issue. (#316)
Browse files Browse the repository at this point in the history
  • Loading branch information
jinglundong authored Jul 11, 2023
1 parent f96845d commit d41edd3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion v2/internal/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit d41edd3

Please sign in to comment.