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

feat(spanner): Add a DirectPath fallback integration test #3487

Merged
merged 2 commits into from Jan 7, 2021

Conversation

mohanli-ml
Copy link
Contributor

@mohanli-ml mohanli-ml commented Dec 24, 2020

Add a DirectPath fallback test for spanner in Golang. The logic of the test is:

  1. First wait until DirectPath traffic is observed;
  2. Blackhole DirectPath net, and wait until the client fallback to use CFE;
  3. Unblackhole DirectPath net, and the client should upgrade back to use DirectPath again.

The DirectPath and CFE traffic are distinguished by peer IP.

@mohanli-ml mohanli-ml requested review from skuruppu and a team as code owners Dec 24, 2020
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Dec 24, 2020
@product-auto-label product-auto-label bot added the api: spanner Issues related to the Cloud Spanner API. label Dec 24, 2020
}

// Precondition: wait for DirectPath to connect.
countEnough := examineTraffic(ctx, client /*blackholeDP = */, false)
Copy link
Contributor

@thiagotnunes thiagotnunes Jan 7, 2021

Choose a reason for hiding this comment

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

nit: /*blackholeDP = */ should be added after the ,

Copy link
Contributor Author

@mohanli-ml mohanli-ml Jan 7, 2021

Choose a reason for hiding this comment

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

The problem is that gofmt will automatically move /*blackholeDP = */ before the ,, do you want me to remove the comment?

Copy link
Contributor

@thiagotnunes thiagotnunes Jan 7, 2021

Choose a reason for hiding this comment

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

No, nevermind, maybe that is the standard.

@thiagotnunes thiagotnunes merged commit de821c5 into googleapis:master Jan 7, 2021
2 checks passed
@josephalvear
Copy link

josephalvear commented Jan 7, 2021

0xSage pushed a commit to 0xSage/google-cloud-go that referenced this pull request Jan 8, 2021
…#3487)

Co-authored-by: Thiago Nunes <thiagotnunes@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: spanner Issues related to the Cloud Spanner API. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants