fixup! cluster/websocket: Automatic WebSocket client topic subscription

This commit is contained in:
Arne Welzel 2025-04-24 15:02:43 +02:00
parent 8edec9885a
commit cf0669ade3
4 changed files with 4 additions and 6 deletions

View file

@ -1,5 +1,5 @@
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63. ### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
connected connected
got ack got ack
ack[endpoint] in topic_parts True ack[endpoint] in topic True
event [{'@data-type': 'string', 'data': 'pong'}, {'@data-type': 'vector', 'data': [{'@data-type': 'count', 'data': 42}]}] event [{'@data-type': 'string', 'data': 'pong'}, {'@data-type': 'vector', 'data': [{'@data-type': 'count', 'data': 42}]}]

View file

@ -1,5 +1,5 @@
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63. ### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
connected connected
got ack got ack
ack[endpoint] in topic_parts True ack[endpoint] in topic True
event [{'@data-type': 'string', 'data': 'pong'}, {'@data-type': 'vector', 'data': [{'@data-type': 'count', 'data': 42}]}] event [{'@data-type': 'string', 'data': 'pong'}, {'@data-type': 'vector', 'data': [{'@data-type': 'count', 'data': 42}]}]

View file

@ -78,8 +78,7 @@ def run(ws_url):
tc.send_json(wstest.build_event_v1("/test/pings/", "ping", [42])) tc.send_json(wstest.build_event_v1("/test/pings/", "ping", [42]))
pong = tc.recv_json(timeout=3) pong = tc.recv_json(timeout=3)
topic, event = pong["topic"], pong["data"][2]["data"][0:2] topic, event = pong["topic"], pong["data"][2]["data"][0:2]
topic_parts = topic.split("/") print("ack[endpoint] in topic", ack["endpoint"] in topic)
print("ack[endpoint] in topic_parts", ack["endpoint"] in topic_parts)
print("event", event) print("event", event)

View file

@ -76,8 +76,7 @@ def run(ws_url):
tc.send_json(wstest.build_event_v1("/test/pings/", "ping", [42])) tc.send_json(wstest.build_event_v1("/test/pings/", "ping", [42]))
pong = tc.recv_json(timeout=3) pong = tc.recv_json(timeout=3)
topic, event = pong["topic"], pong["data"][2]["data"][0:2] topic, event = pong["topic"], pong["data"][2]["data"][0:2]
topic_parts = topic.split(".") print("ack[endpoint] in topic", ack["endpoint"] in topic)
print("ack[endpoint] in topic_parts", ack["endpoint"] in topic_parts)
print("event", event) print("event", event)