-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
server: add tests for combined stmts api source tables #112106
Conversation
4fcc4d2
to
f854072
Compare
2d46114
to
d005e98
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 7 of 7 files at r1, 5 of 5 files at r2, all commit messages.
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @abarganier and @xinhaoz)
pkg/sql/sqlstats/persistedsqlstats/sqlstatsutil/sqlstatstestutil/testutils.go
line 365 at r2 (raw file):
statistics, // statistics plan, // plan // TODO allow these values to be mocked. No need ffor them for now.
nit: typo ffor
317a5eb
to
7d6d4c5
Compare
7d6d4c5
to
9c963e8
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 5 of 14 files at r3, 5 of 5 files at r4, 5 of 9 files at r5, all commit messages.
Reviewable status: complete! 1 of 0 LGTMs obtained (waiting on @abarganier and @xinhaoz)
pkg/sql/sqlstats/persistedsqlstats/sqlstatstestutil/testutils.go
line 1 at r4 (raw file):
// Copyright 2021 The Cockroach Authors.
nit: 2023
302ee56
to
bfb6d0c
Compare
bfb6d0c
to
5a1ac14
Compare
This patch creates the sqlstatstestutils pkg in sqlstats/persistedsqlstats. It moves the function `GetRandomizedCollectedStatementStatisticsForTest` which was previously in sqlstatsutil. This pkg is introduced in preparation for adding more testing utilities to mock sql stats tables without creating cyclic dependencies with sqlstatsutil. Epic: none Release note: None
Add testing to verify that the combined stmts api uses the correct source tables given different table states. Epic: none Release note: None
5a1ac14
to
392a28b
Compare
tftr! |
Build failed (retrying...): |
Build succeeded: |
This patch creates the sqlstatstestutils pkg in
sqlstats/persistedsqlstats. It moves the function
GetRandomizedCollectedStatementStatisticsForTest
which waspreviously in sqlstatsutil. This pkg is introduced in
preparation for adding more testing utilities to mock sql
stats tables without creating cyclic dependencies with
sqlstatsutil.
Epic: none
Release note: None
2: server: add tests for combined stmts api
Add testing to verify that the combined stmts api uses the
correct source tables given different table states.
Epic: none