Skip to content

Commit d961bbe

Browse files
committed
Use time.Millisecond * 1 instead of parsing duration
1 parent b61d6fd commit d961bbe

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

mongo/client_internal_test.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -421,10 +421,7 @@ func TestClient_Ping_DefaultReadPreference(t *testing.T) {
421421
}
422422

423423
func TestClient_Ping_InvalidHost(t *testing.T) {
424-
dur, err := time.ParseDuration("1ms")
425-
require.NoError(t, err)
426-
427-
c, err := NewClientWithOptions("mongodb://nohost:27017", clientopt.ServerSelectionTimeout(dur))
424+
c, err := NewClientWithOptions("mongodb://nohost:27017", clientopt.ServerSelectionTimeout(1*time.Millisecond))
428425
require.NoError(t, err)
429426
require.NotNil(t, c)
430427

0 commit comments

Comments
 (0)