Skip to content

Commit

Permalink
Test worker exit signal
Browse files Browse the repository at this point in the history
  • Loading branch information
munrojm committed Jan 26, 2022
1 parent 6c4f5fd commit 3fceea7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/maggma/cli/__init__.py
Expand Up @@ -65,7 +65,7 @@
help="Number of chunks to distribute to workers",
)
@click.option(
"-d",
"-w",
"--num-workers",
"num_workers",
default=0,
Expand Down
5 changes: 5 additions & 0 deletions tests/cli/test_distributed.py
Expand Up @@ -90,6 +90,11 @@ async def test_manager_give_out_chunks(manager_server, log_to_stdout):
assert work["@module"] == "tests.cli.test_distributed"
assert work["val"] == i

for i in range(0, 10):
await socket.send(b"Ready")
message = await socket.recv()
assert message == b'"EXIT"'


@pytest.mark.asyncio
async def test_worker():
Expand Down

0 comments on commit 3fceea7

Please sign in to comment.