Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve assert_reply error messages #19

Merged
merged 1 commit into from
Jul 29, 2024

Conversation

axelson
Copy link
Contributor

@axelson axelson commented Jul 27, 2024

Currently the error assertions happen directly on all the messages that the channel has received, when we only very specifically care about the specific reply to our message.

This PR splits that assertion into two steps, the first step gets the reply, and the second step asserts on the expected status and reply. They are asserted together so that when there's an error you get detailed information about what the error payload is, otherwise your initial test failure may simply tell you something like ":ok does not equal :error"

Currently the error assertions happen directly on _all_ the messages
that the channel has received, when we only very specifically care about
the specific reply to our message.

This PR splits that assertion into two steps, the first step gets the
reply, and the second step asserts on the expected status and reply.
They are asserted together so that when there's an error you get
detailed information about what the error payload is, otherwise your
initial test failure may simply tell you something like ":ok does not
equal :error"
Copy link
Contributor

@doorgan doorgan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ohh this is a nice one, thanks!

@doorgan doorgan merged commit f71f7e9 into main Jul 29, 2024
6 checks passed
@doorgan doorgan deleted the jax/improve_assert_reply_error_messages branch July 29, 2024 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants