-
Notifications
You must be signed in to change notification settings - Fork 94
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
xds fail fast on invalid URI #161
Conversation
Rather than retry. Also pass a struct with all resource handlers to the client rather than individually. This allows us to easily add the listener handler later. Work on #10
src/test_utils.rs
Outdated
@@ -362,6 +364,19 @@ where | |||
} | |||
} | |||
|
|||
/// Awaits the provided future with a timeout. | |||
/// Returns the future's result or None after the timeout elapses. | |||
pub async fn await_with_timeout<T>(fut: impl Future<Output = T>, timeout: Duration) -> Option<T> { |
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.
That's a good idea!
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.
Over the holidays, I finally found: https://docs.rs/tokio/0.2.24/tokio/time/fn.timeouthtml
Should we switch to this instead, rather than write our own?
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.
Let's get it in there!
Rather than retry.
Also pass a struct with all resource handlers to the client rather
than individually. This allows us to easily add the listener handler later.
Work on #10