File tree Expand file tree Collapse file tree 3 files changed +23
-1
lines changed Expand file tree Collapse file tree 3 files changed +23
-1
lines changed Original file line number Diff line number Diff line change 1313use Illuminate \Cache \Events \WritingKey ;
1414use Illuminate \Contracts \Cache \Store ;
1515use Illuminate \Foundation \Testing \Concerns \InteractsWithRedis ;
16+ use Illuminate \Redis \Connections \PhpRedisClusterConnection ;
17+ use Illuminate \Redis \Connections \PredisClusterConnection ;
1618use Illuminate \Support \Facades \Cache ;
1719use Illuminate \Support \Facades \Config ;
1820use Illuminate \Support \Facades \Event ;
@@ -31,6 +33,12 @@ protected function setUp(): void
3133
3234 $ this ->setUpRedis ();
3335
36+ $ connection = $ this ->app ['redis ' ]->connection ();
37+ $ this ->markTestSkippedWhen (
38+ $ connection instanceof PhpRedisClusterConnection || $ connection instanceof PredisClusterConnection,
39+ 'flushAll currently not supported for Redis Cluster connections ' ,
40+ );
41+
3442 Config::set ('cache.default ' , 'redis ' );
3543 Redis::flushAll ();
3644 }
Original file line number Diff line number Diff line change 33namespace Illuminate \Tests \Integration \Cache ;
44
55use Illuminate \Foundation \Testing \Concerns \InteractsWithRedis ;
6+ use Illuminate \Redis \Connections \PhpRedisClusterConnection ;
7+ use Illuminate \Redis \Connections \PhpRedisConnection ;
68use Illuminate \Support \Facades \Cache ;
79use Orchestra \Testbench \TestCase ;
810use PHPUnit \Framework \Attributes \RequiresPhpExtension ;
@@ -17,6 +19,12 @@ protected function setUp(): void
1719 parent ::setUp ();
1820
1921 $ this ->setUpRedis ();
22+
23+ $ connection = $ this ->app ['redis ' ]->connection ();
24+ $ this ->markTestSkippedUnless (
25+ $ connection instanceof PhpRedisConnection || $ connection instanceof PhpRedisClusterConnection,
26+ 'This test is for phpredis only ' ,
27+ );
2028 }
2129
2230 protected function tearDown (): void
@@ -210,7 +218,6 @@ public function testRedisLockCanBeAcquiredAndReleasedWithLz4Compression()
210218 $ this ->markTestSkipped ('Redis extension is not configured to support the lz4 compression. ' );
211219 }
212220
213- $ this ->app ['config ' ]->set ('database.redis.client ' , 'phpredis ' );
214221 $ this ->app ['config ' ]->set ('cache.stores.redis.connection ' , 'default ' );
215222 $ this ->app ['config ' ]->set ('cache.stores.redis.lock_connection ' , 'default ' );
216223
Original file line number Diff line number Diff line change 66use Illuminate \Cache \RedisStore ;
77use Illuminate \Foundation \Testing \Concerns \InteractsWithRedis ;
88use Illuminate \Redis \Connections \PhpRedisClusterConnection ;
9+ use Illuminate \Redis \Connections \PredisClusterConnection ;
910use Illuminate \Support \Facades \Cache ;
1011use Illuminate \Support \Facades \Redis ;
1112use Illuminate \Support \Sleep ;
@@ -22,6 +23,12 @@ protected function setUp(): void
2223 {
2324 $ this ->afterApplicationCreated (function () {
2425 $ this ->setUpRedis ();
26+
27+ $ connection = $ this ->app ['redis ' ]->connection ();
28+ $ this ->markTestSkippedWhen (
29+ $ connection instanceof PhpRedisClusterConnection || $ connection instanceof PredisClusterConnection,
30+ 'RedisStore currently does not support tags, many and some other on Redis Cluster cluster connections ' ,
31+ );
2532 });
2633
2734 $ this ->beforeApplicationDestroyed (function () {
You can’t perform that action at this time.
0 commit comments