Skip to content

Commit 0ff2ec7

Browse files
GODRIVER-3444 Add tests for CalculateMaxTimeMS
1 parent 90b9171 commit 0ff2ec7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

internal/driverutil/operation_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ func TestCalculateMaxTimeMS(t *testing.T) {
6161
{
6262
name: "beyond maxInt32",
6363
ctx: func() context.Context {
64-
ctx, _ := context.WithDeadline(context.Background(), time.Now().Add(time.Duration(math.MaxInt32+1000)*time.Millisecond)) //nolint:govet
64+
dur := time.Now().Add(time.Duration(math.MaxInt32+1000) * time.Millisecond)
65+
ctx, _ := context.WithDeadline(context.Background(), dur) //nolint:govet
6566
return ctx
6667
}(),
6768
wantZero: true,

0 commit comments

Comments
 (0)