Raise exception in Python if wait is called with duplicate object IDs. (#262)

This commit is contained in:
Robert Nishihara
2017-02-09 23:32:19 -08:00
committed by Philipp Moritz
parent 0aa234fb9c
commit 249b667b0e
3 changed files with 11 additions and 1 deletions
+4
View File
@@ -380,6 +380,10 @@ class APITest(unittest.TestCase):
self.assertEqual(len(ready_ids), 1)
self.assertEqual(len(remaining_ids), 3)
# Verify that calling wait with duplicate object IDs throws an exception.
x = ray.put(1)
self.assertRaises(Exception, lambda : ray.wait([x, x]))
ray.worker.cleanup()
def testMultipleWaitsAndGets(self):