From edf8d1ee9fd7a73dd3348ecb3dcff70073d3f4f2 Mon Sep 17 00:00:00 2001 From: Robert Nishihara Date: Sat, 17 Dec 2016 12:42:37 -0800 Subject: [PATCH] Fix Python3 error in tests. (#135) --- src/common/redis_module/runtest.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/redis_module/runtest.py b/src/common/redis_module/runtest.py index 761051e87..798c5af40 100644 --- a/src/common/redis_module/runtest.py +++ b/src/common/redis_module/runtest.py @@ -121,7 +121,7 @@ class TestGlobalStateStore(unittest.TestCase): def testTaskTableAddAndLookup(self): # Check that task table adds, updates, and lookups work correctly. - task_args = [1, "node_id", "task_spec"] + task_args = [1, b"node_id", b"task_spec"] response = self.redis.execute_command("RAY.TASK_TABLE_ADD", "task_id", *task_args) response = self.redis.execute_command("RAY.TASK_TABLE_GET", "task_id") @@ -140,7 +140,7 @@ class TestGlobalStateStore(unittest.TestCase): p.psubscribe("{prefix}*:*".format(prefix=TASK_PREFIX)) p.psubscribe("{prefix}*:{state: >2}".format(prefix=TASK_PREFIX, state=scheduling_state)) p.psubscribe("{prefix}{node}:*".format(prefix=TASK_PREFIX, node=node_id)) - task_args = ["task_id", scheduling_state, node_id, "task_spec"] + task_args = [b"task_id", scheduling_state, node_id.encode("ascii"), b"task_spec"] self.redis.execute_command("RAY.TASK_TABLE_ADD", *task_args) # Receive the acknowledgement message. self.assertEqual(p.get_message()["data"], 1)