From 676736c8b51a69a5838b2d519ed2809aa8bdec28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Tamarelle?= Date: Wed, 13 Nov 2024 17:39:47 +0100 Subject: [PATCH 1/2] Increase connection timeouts to allow using Atlas shared clusters --- tests/ConnectionTest.php | 4 ++-- tests/config/database.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/ConnectionTest.php b/tests/ConnectionTest.php index affb6bd8a..96a58a559 100644 --- a/tests/ConnectionTest.php +++ b/tests/ConnectionTest.php @@ -350,8 +350,8 @@ public function testPingMethod() 'dsn' => env('MONGODB_URI', 'mongodb://127.0.0.1/'), 'database' => 'unittest', 'options' => [ - 'connectTimeoutMS' => 100, - 'serverSelectionTimeoutMS' => 250, + 'connectTimeoutMS' => 1000, + 'serverSelectionTimeoutMS' => 1000, ], ]; diff --git a/tests/config/database.php b/tests/config/database.php index 275dce61a..b35afa978 100644 --- a/tests/config/database.php +++ b/tests/config/database.php @@ -10,8 +10,8 @@ 'dsn' => env('MONGODB_URI', 'mongodb://127.0.0.1/'), 'database' => env('MONGODB_DATABASE', 'unittest'), 'options' => [ - 'connectTimeoutMS' => 100, - 'serverSelectionTimeoutMS' => 250, + 'connectTimeoutMS' => 1000, + 'serverSelectionTimeoutMS' => 1000, ], ], From 77c259f15b05555bf1ca6628ab714e00573477ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Tamarelle?= Date: Thu, 14 Nov 2024 11:05:06 +0100 Subject: [PATCH 2/2] Increase serverSelectionTimeoutMS --- tests/ConnectionTest.php | 2 +- tests/config/database.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/ConnectionTest.php b/tests/ConnectionTest.php index 96a58a559..1efd17be0 100644 --- a/tests/ConnectionTest.php +++ b/tests/ConnectionTest.php @@ -351,7 +351,7 @@ public function testPingMethod() 'database' => 'unittest', 'options' => [ 'connectTimeoutMS' => 1000, - 'serverSelectionTimeoutMS' => 1000, + 'serverSelectionTimeoutMS' => 6000, ], ]; diff --git a/tests/config/database.php b/tests/config/database.php index b35afa978..8a22d766c 100644 --- a/tests/config/database.php +++ b/tests/config/database.php @@ -11,7 +11,7 @@ 'database' => env('MONGODB_DATABASE', 'unittest'), 'options' => [ 'connectTimeoutMS' => 1000, - 'serverSelectionTimeoutMS' => 1000, + 'serverSelectionTimeoutMS' => 6000, ], ],