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

Refactor the integration tests for transaction #215

Merged
merged 1 commit into from
Jun 10, 2021

Conversation

brfrn169
Copy link
Collaborator

@brfrn169 brfrn169 commented Jun 9, 2021

This is a very minor change. Please take a look!

@brfrn169 brfrn169 requested a review from feeblefakie June 9, 2021 12:51
@brfrn169 brfrn169 self-assigned this Jun 9, 2021
@brfrn169 brfrn169 force-pushed the refactor-integration-tests-for-transaction branch from 6770e47 to 29bd058 Compare June 9, 2021 13:08
@brfrn169 brfrn169 force-pushed the refactor-integration-tests-for-transaction branch from 29bd058 to 0d42999 Compare June 9, 2021 13:17
Copy link
Contributor

@feeblefakie feeblefakie left a comment

Choose a reason for hiding this comment

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

Thank you!
The code looks good but I don't know why we use ConsensusCommit and JdbcTransaction instead of DistributedTransaction.

@@ -841,14 +837,14 @@ public void get_GetGivenForDeletedWhenCoordinatorStateNotExistAndExpired_ShouldA
public void getAndScan_CommitHappenedInBetween_ShouldReadRepeatably()
throws CrudException, CommitException, UnknownTransactionStatusException {
// Arrange
DistributedTransaction transaction = manager.start();
ConsensusCommit transaction = manager.start();
Copy link
Contributor

Choose a reason for hiding this comment

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

Just a question. Is there any reason of using ConsensusCommit instead of DistributedTransaction?
(usually we should use DistributedTransaction, right?)

Copy link
Collaborator Author

@brfrn169 brfrn169 Jun 10, 2021

Choose a reason for hiding this comment

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

Thank you for reviewing this!

The reason for those changes is that the integration tests are actually just for ConsensusCommit, but not for general DistributedTransaction (I found that when I tried to use it for gRPC transactions, but I couldn't). To highlight that, I made those changes, but they are not very important. And yes, usually we should use DistributedTransaction.

Copy link
Contributor

@feeblefakie feeblefakie left a comment

Choose a reason for hiding this comment

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

LGTM! (from mobile)

@feeblefakie feeblefakie merged commit 35e01d2 into master Jun 10, 2021
@brfrn169 brfrn169 deleted the refactor-integration-tests-for-transaction branch June 11, 2021 06:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants