Skip to content

Commit

Permalink
Merge pull request #468 from itamarst/467-test-failures
Browse files Browse the repository at this point in the history
Update tests to match latest Dask/Distributed
  • Loading branch information
itamarst authored May 17, 2021
2 parents e858c8e + 18bfce9 commit eeb56bf
Showing 1 changed file with 3 additions and 19 deletions.
22 changes: 3 additions & 19 deletions eliot/tests/test_dask.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,6 @@ def summer(x, y):
top_action_name: [
{"eliot:remote_task": ["dask:task", "mult"]},
{"eliot:remote_task": ["dask:task", "mult"]},
{"eliot:remote_task": ["dask:task"]},
{"eliot:remote_task": ["dask:task"]},
{"eliot:remote_task": ["dask:task", "finally"]},
]
}
Expand All @@ -119,33 +117,19 @@ def summer(x, y):
(
mult1_msg,
mult2_msg,
reduce1_msg,
reduce2_msg,
final_msg,
) = LoggedMessage.ofType(logger.messages, "dask:task")
self.assertEqual(
reduce1_msg.message["dependencies"], [mult1_msg.message["key"]]
)
self.assertEqual(
reduce2_msg.message["dependencies"], [mult2_msg.message["key"]]
)
self.assertEqual(
sorted(final_msg.message["dependencies"]),
sorted([reduce1_msg.message["key"], reduce2_msg.message["key"]]),
sorted([mult1_msg.message["key"], mult2_msg.message["key"]]),
)

# Make sure dependencies are logically earlier in the logs:
self.assertTrue(
mult1_msg.message["task_level"] < reduce1_msg.message["task_level"]
)
self.assertTrue(
mult2_msg.message["task_level"] < reduce2_msg.message["task_level"]
)
self.assertTrue(
reduce1_msg.message["task_level"] < final_msg.message["task_level"]
mult1_msg.message["task_level"] < final_msg.message["task_level"]
)
self.assertTrue(
reduce2_msg.message["task_level"] < final_msg.message["task_level"]
mult2_msg.message["task_level"] < final_msg.message["task_level"]
)


Expand Down

0 comments on commit eeb56bf

Please sign in to comment.