mirror of
https://github.com/langgenius/dify.git
synced 2024-11-16 11:42:29 +08:00
Fix3 the issues with langgenius#9538
Signed-off-by: root <root@localhost.localdomain>
This commit is contained in:
parent
d66ae4ae12
commit
ac817303ce
|
@ -39,6 +39,11 @@ def lb_model_manager():
|
||||||
return lb_model_manager
|
return lb_model_manager
|
||||||
|
|
||||||
|
|
||||||
|
class FakeRedisClient:
|
||||||
|
def __init__(self, host='localhost', port=6379, db=0):
|
||||||
|
self.client = redis.Redis(host=host, port=port, db=db)
|
||||||
|
|
||||||
|
|
||||||
def test_lb_model_manager_fetch_next(mocker, lb_model_manager):
|
def test_lb_model_manager_fetch_next(mocker, lb_model_manager):
|
||||||
assert len(lb_model_manager._load_balancing_configs) == 3
|
assert len(lb_model_manager._load_balancing_configs) == 3
|
||||||
|
|
||||||
|
@ -57,7 +62,7 @@ def test_lb_model_manager_fetch_next(mocker, lb_model_manager):
|
||||||
start_index += 1
|
start_index += 1
|
||||||
return start_index
|
return start_index
|
||||||
|
|
||||||
fake_redis_client = redis.Redis(host="localhost", port=6379, db=0)
|
fake_redis_client = FakeRedisClient()
|
||||||
redis_client = RedisClientWrapper()
|
redis_client = RedisClientWrapper()
|
||||||
redis_client.initialize(fake_redis_client)
|
redis_client.initialize(fake_redis_client)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user