Skip to content

Commit 9db6b44

Browse files
alcaeuslevon80999
and
levon80999
committed
Add connection options for faster failures in tests
The faster connection and server selection timeouts ensure we don't spend too much time waiting for the inevitable as we're expecting fast connections on CI systems Co-authored-by: levon80999 <levonb@ucraft.com>
1 parent fcb7c32 commit 9db6b44

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/config/database.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77
'driver' => 'mongodb',
88
'dsn' => env('MONGODB_URI', 'mongodb://127.0.0.1/'),
99
'database' => env('MONGO_DATABASE', 'unittest'),
10+
'options' => [
11+
'connectTimeoutMS' => 100,
12+
'serverSelectionTimeoutMS' => 250,
13+
],
1014
],
1115

1216
'mysql' => [

0 commit comments

Comments
 (0)