1414from redisvl .schema import IndexSchema
1515
1616
17+ @pytest .mark .requires_cluster
1718def test_sync_client_validation (redis_url , redis_cluster_url ):
1819 """Test validation of sync Redis client types."""
1920 # Test regular Redis client
@@ -25,6 +26,7 @@ def test_sync_client_validation(redis_url, redis_cluster_url):
2526 RedisConnectionFactory .validate_sync_redis (cluster_client )
2627
2728
29+ @pytest .mark .requires_cluster
2830@pytest .mark .asyncio
2931async def test_async_client_validation (redis_cluster_url ):
3032 """Test validation of async Redis client types."""
@@ -34,6 +36,7 @@ async def test_async_client_validation(redis_cluster_url):
3436 await RedisConnectionFactory .validate_async_redis (async_cluster_client )
3537
3638
39+ @pytest .mark .requires_cluster
3740@pytest .mark .asyncio
3841async def test_sync_to_async_conversion_rejects_cluster_client (redis_cluster_url ):
3942 """Test that sync-to-async conversion rejects RedisCluster clients."""
@@ -44,6 +47,7 @@ async def test_sync_to_async_conversion_rejects_cluster_client(redis_cluster_url
4447 RedisConnectionFactory .sync_to_async_redis (cluster_client )
4548
4649
50+ @pytest .mark .requires_cluster
4751def test_search_index_cluster_client (redis_cluster_url ):
4852 """Test that SearchIndex correctly accepts RedisCluster clients."""
4953 # Create a simple schema
@@ -66,6 +70,7 @@ def test_search_index_cluster_client(redis_cluster_url):
6670 index .delete (drop = True )
6771
6872
73+ @pytest .mark .requires_cluster
6974@pytest .mark .asyncio
7075async def test_async_search_index_client (redis_cluster_url ):
7176 """Test that AsyncSearchIndex correctly handles AsyncRedis clients."""
@@ -94,6 +99,7 @@ async def test_async_search_index_client(redis_cluster_url):
9499 await cluster_client .aclose ()
95100
96101
102+ @pytest .mark .requires_cluster
97103@pytest .mark .asyncio
98104async def test_embeddings_cache_cluster_async (redis_cluster_url ):
99105 """Test that EmbeddingsCache correctly handles AsyncRedisCluster clients."""
@@ -117,6 +123,7 @@ async def test_embeddings_cache_cluster_async(redis_cluster_url):
117123 await cluster_client .aclose ()
118124
119125
126+ @pytest .mark .requires_cluster
120127def test_embeddings_cache_cluster_sync (redis_cluster_url ):
121128 """Test that EmbeddingsCache correctly handles RedisCluster clients."""
122129 cluster_client = RedisCluster .from_url (redis_cluster_url )
@@ -147,6 +154,7 @@ def test_embeddings_cache_cluster_sync(redis_cluster_url):
147154 cache .clear ()
148155
149156
157+ @pytest .mark .requires_cluster
150158def test_semantic_router_cluster_client (redis_cluster_url , hf_vectorizer ):
151159 """Test that SemanticRouter works correctly with RedisCluster clients."""
152160 routes = [
0 commit comments