From c8a819cea914fcec7ff4c855926373f17a070bcf Mon Sep 17 00:00:00 2001 From: zachjweiner <zachjweiner@gmail.com> Date: Tue, 27 Aug 2019 10:10:59 -0500 Subject: [PATCH] correct get_async test --- test/test_array.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/test_array.py b/test/test_array.py index cf63fc14..e9fb2ddd 100644 --- a/test/test_array.py +++ b/test/test_array.py @@ -1231,15 +1231,15 @@ def test_get_async(ctx_factory): b_gpu.finish() assert np.abs(b1 - b).mean() < 1e-5 - b1 = b_gpu.get_async() # testing that this waits for events - b_gpu.finish() + b1, evt = b_gpu.get_async() # testing that this waits for events + evt.wait() assert np.abs(b1 - b).mean() < 1e-5 wait_event = cl.UserEvent(context) b_gpu.add_event(wait_event) - b = b_gpu.get_async() # testing that this doesn't hang + b, evt = b_gpu.get_async() # testing that this doesn't hang wait_event.set_status(cl.command_execution_status.COMPLETE) - b_gpu.finish() + evt.wait() assert np.abs(b1 - b).mean() < 1e-5 -- GitLab