Skip to content

Commit

Permalink
Add test for wait reconstruction. (ray-project#3110)
Browse files Browse the repository at this point in the history
  • Loading branch information
robertnishihara authored and pcmoritz committed Oct 23, 2018
1 parent 73a092e commit 22dd7e0
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions test/runtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -2551,3 +2551,22 @@ def test_initialized_local_mode(shutdown_only_with_initialization_check):
assert not ray.is_initialized()
ray.init(num_cpus=0, local_mode=True)
assert ray.is_initialized()


@pytest.mark.skipif(
os.environ.get("RAY_USE_XRAY") != "1",
reason="This test only works with xray.")
def test_wait_reconstruction(shutdown_only):
ray.init(num_cpus=1, object_store_memory=10**8)

@ray.remote
def f():
return np.zeros(6 * 10**7, dtype=np.uint8)

x_id = f.remote()
ray.wait([x_id])
ray.wait([f.remote()])
assert not ray.worker.global_worker.plasma_client.contains(
ray.pyarrow.plasma.ObjectID(x_id.id()))
ready_ids, _ = ray.wait([x_id])
assert len(ready_ids) == 1

0 comments on commit 22dd7e0

Please sign in to comment.