-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
release-21.2: improve statusccl package unit test #73446
release-21.2: improve statusccl package unit test #73446
Conversation
Thanks for opening a backport. Please check the backport criteria before merging:
If some of the basic criteria cannot be satisfied, ensure that the exceptional criteria are satisfied within.
Add a brief release justification to the body of your PR to justify this backport. Some other things to consider:
|
Previously, tenant status server tests live within serverccl package. However, this caused all nightly test failures to automaticallly notify server team through GitHub code owner file. This commit moves all tenant status server into statusccl package and update statusccl package code owner to SQL O11y. Release note: None
Pushing these assertions into the test client removes some of the line noise from the tests, making them easier to read. We also generalize the tenant http client to provide plain text as well as json responses. Release note: None
Previously, running statusccl tests was very expensive. This was because for each unit tests, the test helper set up a host cluster and two tenant clusters. This resulted in total of 9 nodes being created and destroyed. This commit addresses this issue by having all unit tests sharing a single test helper to avoid unnecessary setup and teardowns of clusters. Resolves cockroachdb#73359. Release note: None
Previously, we spin up 1 host cluster and 2 tenant clusters for testing tenant status server. Each cluster contains 3 nodes and we effectively spin up 9 nodes for the test. This is very expensive and can cause errors like "race: limit on 8128 simultaneously alive goroutines is exceeded, dying" due to the underyling LLVM limitation. This commit reduces the total number of nodes that are spinned up. Host cluster and the second tenant cluster size is now reduced to 1 node to reduce the cost of the tests. Additional special `randomServerIdx` value is introduced to avoid having the test rely on the hard-coded server index. Release note: None
6e3c494
to
5f7c9ae
Compare
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.
Reviewed 8 of 8 files at r1, 2 of 2 files at r2, 1 of 1 files at r3, 2 of 2 files at r4, all commit messages.
Reviewable status: complete! 1 of 0 LGTMs obtained (waiting on @Azhng)
Backport:
Please see individual PRs for details.
/cc @cockroachdb/release
Release Justification: Test only change