Skip to content

Commit

Permalink
Add graceful shutdown in test_dht_experts
Browse files Browse the repository at this point in the history
  • Loading branch information
mryab committed Jun 9, 2024
1 parent a98c59d commit e955347
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/test_dht_experts.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ def test_beam_search(
assert all(isinstance(e, hivemind.RemoteExpert) for experts in batch_experts for e in experts)
assert all(len(experts) == beam_size for experts in batch_experts)

you.shutdown()
for dht_instance in dht_instances:
dht_instance.shutdown()


@pytest.mark.forked
def test_dht_single_node():
Expand Down Expand Up @@ -119,6 +123,8 @@ def test_dht_single_node():
with pytest.raises(AssertionError):
beam_search.get_active_successors(["e.1.2.", "e.2", "e.4.5."])

node.shutdown()


def test_uid_patterns():
valid_experts = [
Expand Down

0 comments on commit e955347

Please sign in to comment.