Skip to content

Commit 0d9d1eb

Browse files
committed
Increase cache reconnect test wait times
1 parent 9f2da33 commit 0d9d1eb

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

tests/e2e/Adapter/Scopes/GeneralTests.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -710,12 +710,13 @@ public function testCacheReconnect(): void
710710
}
711711

712712
// Wait for Redis to be fully healthy after previous test
713-
sleep(3);
713+
sleep(5);
714714

715-
// Create new cache with reconnection enabled
715+
// Create new cache with reconnection enabled and verify connection
716716
$redis = new \Redis();
717717
$redis->connect('redis', 6379);
718-
$cache = new Cache((new RedisAdapter($redis))->setMaxRetries(2));
718+
$redis->ping(); // Verify connection is healthy
719+
$cache = new Cache((new RedisAdapter($redis))->setMaxRetries(3));
719720
$database->setCache($cache);
720721

721722
$database->getAuthorization()->cleanRoles();
@@ -752,7 +753,7 @@ public function testCacheReconnect(): void
752753

753754
// Bring back Redis
754755
Console::execute('docker ps -a --filter "name=utopia-redis" --format "{{.Names}}" | xargs -r docker start', "", $stdout, $stderr);
755-
sleep(5);
756+
sleep(7);
756757

757758
// Cache should reconnect - read should work
758759
$doc = $database->getDocument('testCacheReconnect', 'reconnect_doc');

0 commit comments

Comments
 (0)