Skip to content

Commit

Permalink
Fix CI
Browse files Browse the repository at this point in the history
Signed-off-by: Qing Wang <kingchin1218@gmail.com>
  • Loading branch information
jovany-wang committed Jul 11, 2023
1 parent 5c2fba0 commit a1a72d6
Showing 1 changed file with 18 additions and 12 deletions.
30 changes: 18 additions & 12 deletions tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,21 +41,27 @@ def test_fed_apis():


def test_miss_party_name_on_actor():
compatible_utils.init_ray(address='local')
cluster = {
'alice': {'address': '127.0.0.1:11012'},
}
fed.init(cluster=cluster, party="alice")
def run():
compatible_utils.init_ray(address='local')
cluster = {
'alice': {'address': '127.0.0.1:11012'},
}
fed.init(cluster=cluster, party="alice")

@fed.remote
class MyActor:
pass
@fed.remote
class MyActor:
pass

with pytest.raises(ValueError):
MyActor.remote()
with pytest.raises(ValueError):
MyActor.remote()

fed.shutdown()
ray.shutdown()
fed.shutdown()
ray.shutdown()

p_alice = multiprocessing.Process(target=run)
p_alice.start()
p_alice.join()
assert p_alice.exitcode == 0


if __name__ == "__main__":
Expand Down

0 comments on commit a1a72d6

Please sign in to comment.