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

kv: unit test PrepareTransactionForRetry and TransactionRefreshTimestamp #108496

Merged

Conversation

nvanbenschoten
Copy link
Member

Informs #104233.

This commit adds a pair of new unit tests to verify the behavior of PrepareTransactionForRetry and TransactionRefreshTimestamp. These functions will be getting more complex for #104233, so it will be helpful to have these tests in place. The tests also serve as good documentation.

Release note: None

Informs cockroachdb#104233.

This commit adds a pair of new unit tests to verify the behavior of
`PrepareTransactionForRetry` and `TransactionRefreshTimestamp`. These
functions will be getting more complex for cockroachdb#104233, so it will be
helpful to have these tests in place. The tests also serve as good
documentation.

Release note: None
@nvanbenschoten nvanbenschoten requested a review from a team as a code owner August 10, 2023 03:28
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Contributor

@miraradeva miraradeva left a comment

Choose a reason for hiding this comment

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

:lgtm: Nice tests!

It's slightly confusing that the expected behavior is different for TransactionRetryError with RETRY_WRITE_TOO_OLD and WriteTooOldError but I did some digging and it makes sense. It's great that these new tests make the difference explicit.

Reviewed 4 of 4 files at r1, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @nvanbenschoten)

@nvanbenschoten
Copy link
Member Author

TFTR!

bors r=miraradeva

@craig
Copy link
Contributor

craig bot commented Aug 10, 2023

Build succeeded:

@craig craig bot merged commit 1f8fa96 into cockroachdb:master Aug 10, 2023
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