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

upgrades: add ExecForCountInTxns helper function for testing #98163

Merged
merged 1 commit into from
Mar 9, 2023

Conversation

andyyang890
Copy link
Collaborator

This patch adds a helper function called ExecForCountInTxns, which abstracts
out the logic to repeatedly run SQL statements on a database in transactions
of a specified size. It also refactors existing usages of this pattern to use
this new function.

Part of #87079

Release note: None

@andyyang890 andyyang890 requested review from rafiss and a team March 7, 2023 19:04
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Collaborator

@rafiss rafiss left a comment

Choose a reason for hiding this comment

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

lgtm!

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @andyyang890)


pkg/upgrade/upgrades/helpers_test.go line 178 at r1 (raw file):

	t *testing.T,
	db *gosql.DB,
	count int,

would txnSize be a better name for this?

This patch adds a helper function called `ExecForCountInTxns`, which abstracts
out the logic to repeatedly run SQL statements on a database in transactions
of a specified size. It also refactors existing usages of this pattern to use
this new function.

Release note: None
@andyyang890
Copy link
Collaborator Author

TFTR!

bors r=rafiss

@craig
Copy link
Contributor

craig bot commented Mar 9, 2023

Build succeeded:

@craig craig bot merged commit b79d2ce into cockroachdb:master Mar 9, 2023
@andyyang890 andyyang890 deleted the exec_in_txns branch March 9, 2023 03:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants