Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion pingora-core/src/connectors/l4.rs
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,13 @@ mod tests {
let new_session = connect(&peer, Some(bind_to)).await;
let error = new_session.unwrap_err();
// XXX: some system will allow the socket to bind and connect without error, only to timeout
assert!(error.etype() == &ConnectError || error.etype() == &ConnectTimedout)
assert!(
error.etype() == &ConnectError
|| error.etype() == &ConnectTimedout
// The error seen on mac: https://github.com/cloudflare/pingora/pull/679
|| (error.etype() == &InternalError),
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we also add a comment explaining why we have the InternalError check here (i.e. "the error seen on mac is...")?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

I added link to this PR, full error text might be too long to be included in code comments.

"{error:?}"
)
}

#[tokio::test]
Expand Down