runtest.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:ray 作者: ray-project 项目源码 文件源码
def testInvalidTaskTableAdd(self):
        # Check that Redis returns an error when RAY.TASK_TABLE_ADD is called
        # with the wrong arguments.
        with self.assertRaises(redis.ResponseError):
            self.redis.execute_command("RAY.TASK_TABLE_ADD")
        with self.assertRaises(redis.ResponseError):
            self.redis.execute_command("RAY.TASK_TABLE_ADD", "hello")
        with self.assertRaises(redis.ResponseError):
            self.redis.execute_command("RAY.TASK_TABLE_ADD", "task_id", 3,
                                       "node_id")
        with self.assertRaises(redis.ResponseError):
            # Non-integer scheduling states should not be added.
            self.redis.execute_command("RAY.TASK_TABLE_ADD", "task_id",
                                       "invalid_state", "node_id", "task_spec")
        with self.assertRaises(redis.ResponseError):
            # Should not be able to update a non-existent task.
            self.redis.execute_command("RAY.TASK_TABLE_UPDATE", "task_id", 10,
                                       "node_id", b"")
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号