Skip to content

Commit

Permalink
test(s) added
Browse files Browse the repository at this point in the history
  • Loading branch information
dwsutherland committed Jun 10, 2024
1 parent f63876e commit b86c3e4
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/integration/test_publisher.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,13 @@ async def test_publisher(flow, scheduler, run, one_conf, port_range):
schd.workflow,
host=schd.host,
port=schd.server.pub_port,
topics=[b'workflow']
topics=[b'shutdown']
)

subscriber.unsubscribe_topic(b'shutdown')
subscriber.subscribe_topic(b'workflow')
assert subscriber.topics == {b'workflow'}

async with timeout(2):
# wait for the first delta from the workflow
btopic, msg = await subscriber.socket.recv_multipart()
Expand Down
11 changes: 11 additions & 0 deletions tests/integration/test_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,17 @@ def test_pb_entire_workflow(myflow):
assert data.workflow.id == myflow.id


def test_pb_workflow_only(myflow):
"""Test Protobuf workflow only endpoint method."""
data = PB_METHOD_MAP['pb_workflow_only']()
data.ParseFromString(
call_server_method(
myflow.server.pb_workflow_only
)
)
assert data.workflow.id == myflow.id


async def test_stop(one: Scheduler, start):
"""Test stop."""
async with start(one):
Expand Down

0 comments on commit b86c3e4

Please sign in to comment.