diff --git a/tests/test_redis.py b/tests/test_redis.py index 48773333..1f7ea659 100644 --- a/tests/test_redis.py +++ b/tests/test_redis.py @@ -39,8 +39,10 @@ async def test_redis_store(redis_store): assert find_item(wss, "name", "test") api = await redis_store.connect_to_workspace("test", client_id="test-app-99") - # clients = await api.list_clients() - # assert find_item(clients, "id", "test/test-app-99") + # Need to wait for the client to be registered + await asyncio.sleep(0.1) + clients = await api.list_clients() + assert find_item(clients, "id", "test/test-app-99") await api.log("hello") services = await api.list_services() assert len(services) == 1 @@ -72,9 +74,11 @@ def echo(data): await api.register_service(interface) wm = await redis_store.connect_to_workspace("test", client_id="test-app-22") - # clients = await wm.list_clients() - # assert find_item(clients, "id", "test/test-app-22") - # assert find_item(clients, "id", "test/test-app-99") + await asyncio.sleep(0.1) + # Need to wait for the client to be registered + clients = await wm.list_clients() + assert find_item(clients, "id", "test/test-app-22") + assert find_item(clients, "id", "test/test-app-99") rpc = wm.rpc services = await wm.list_services() service = await rpc.get_remote_service("test-app-99:test-service")