Skip to content

Commit

Permalink
Fix client report
Browse files Browse the repository at this point in the history
  • Loading branch information
oeway committed Nov 25, 2024
1 parent 5acb0ac commit bd48754
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions tests/test_redis.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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")
Expand Down

0 comments on commit bd48754

Please sign in to comment.