-
Notifications
You must be signed in to change notification settings - Fork 8
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
fix(ex/api/stream_test): fix intermitently failing tests #2303
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
{:ok, conn} = Conn.chunk(conn, "event: ignores unexpected events\n\n") | ||
{:ok, conn} = Conn.chunk(conn, "ignored garbled data\n\n") | ||
{:ok, conn} = Conn.chunk(conn, "event: reset\ndata: #{Jason.encode!([data])}\n\n") | ||
{:ok, conn} = Conn.chunk(conn, "event: add\ndata: #{Jason.encode!(data)}\n\n") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this introduce flakiness if Jason.encode!
doesn't follow the same key order each time?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't believe so, because we're asserting on the type returned and the event returned, but it doesn't seem that we're asserting on any of the JSON data.
I tried fixing this by addressing the Bypass issue, but that didn't actually help. So instead I've decided to cut out the
ServerSentEventsStage
and replace it with the parse results thatApi.Stream
received from the tests before this change.Asana Ticket: ⚙️ Fix false positive test failure in
stream_test.ex
CI Runs Information
stream_test
Failures in #2303 so far14 Successful Jobs