-
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
Add xDS integration test #210
Conversation
Work on #10
_ = &mut timeout => { | ||
unreachable!("timed-out waiting for xDS update to be applied") | ||
}, | ||
_ = interval.tick() => { |
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.
Quite possible I'm missing something here, but if interval.tick()
is running every 10 milliseconds, how could we ever end up in the timeout
branch?
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.
we're running in a loop, in each iteration either timeout
is resolved or the next interval.tick
is resolved (tokio::select reevaluates each expression when its future resolves). so that at some eventual iteration, timeout will be 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.
Oh wait. I think I might get it.
What I think we're saying here is:
- Check every 10ms for the response
- If the check takes longer than 10s in total (not on each loop), then the test has failed.
I got it confused and thought it was only run timeout
if timeout
was active for 10s on each loop - but that's not the case.
Is that right?
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.
Yes that's how it works
|
||
#[allow(deprecated)] | ||
fn create_cluster_resource(name: &str, endpoint_addr: SocketAddr) -> Cluster { | ||
Cluster { |
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.
Owie 😃 that was a lot to type.
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.
Thankfully not this time around, I copied it from our xds package
Doh! looks like rebasing against master created a compilation issue. |
Work on #10