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

Add xDS integration test #210

Merged
merged 3 commits into from
Mar 14, 2021
Merged

Add xDS integration test #210

merged 3 commits into from
Mar 14, 2021

Conversation

iffyio
Copy link
Collaborator

@iffyio iffyio commented Mar 10, 2021

Work on #10

@iffyio iffyio requested a review from markmandel March 10, 2021 20:20
@google-cla google-cla bot added the cla: yes label Mar 10, 2021
_ = &mut timeout => {
unreachable!("timed-out waiting for xDS update to be applied")
},
_ = interval.tick() => {
Copy link
Member

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?

Copy link
Collaborator Author

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

Copy link
Member

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?

Copy link
Collaborator Author

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 {
Copy link
Member

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.

Copy link
Collaborator Author

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

@markmandel markmandel added the area/tests Unit tests, integration tests, anything to make sure things don't break label Mar 12, 2021
@markmandel
Copy link
Member

Doh! looks like rebasing against master created a compilation issue.

@iffyio iffyio merged commit 66f5c09 into main Mar 14, 2021
@iffyio iffyio deleted the iu/xds-integration-tes branch March 14, 2021 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/tests Unit tests, integration tests, anything to make sure things don't break cla: yes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants