Skip to content

Commit b86c3e4

Browse files
committed
test(s) added
1 parent f63876e commit b86c3e4

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

tests/integration/test_publisher.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,13 @@ async def test_publisher(flow, scheduler, run, one_conf, port_range):
3232
schd.workflow,
3333
host=schd.host,
3434
port=schd.server.pub_port,
35-
topics=[b'workflow']
35+
topics=[b'shutdown']
3636
)
3737

38+
subscriber.unsubscribe_topic(b'shutdown')
39+
subscriber.subscribe_topic(b'workflow')
40+
assert subscriber.topics == {b'workflow'}
41+
3842
async with timeout(2):
3943
# wait for the first delta from the workflow
4044
btopic, msg = await subscriber.socket.recv_multipart()

tests/integration/test_server.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,17 @@ def test_pb_entire_workflow(myflow):
7979
assert data.workflow.id == myflow.id
8080

8181

82+
def test_pb_workflow_only(myflow):
83+
"""Test Protobuf workflow only endpoint method."""
84+
data = PB_METHOD_MAP['pb_workflow_only']()
85+
data.ParseFromString(
86+
call_server_method(
87+
myflow.server.pb_workflow_only
88+
)
89+
)
90+
assert data.workflow.id == myflow.id
91+
92+
8293
async def test_stop(one: Scheduler, start):
8394
"""Test stop."""
8495
async with start(one):

0 commit comments

Comments
 (0)