Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@olavloite
Copy link

Adds miscellaneous unit tests that had not yet been merged in.
Two test cases in the JdbcAbortedTransactionTest will fail until #5952 has been merged.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jul 31, 2019
@olavloite olavloite requested a review from kolea2 July 31, 2019 19:33
@kolea2
Copy link
Contributor

kolea2 commented Aug 1, 2019

Will review after rebase :)

Aborted transactions were not handled correctly by the executeUpdate and
batchUpdate methods when used in combination with a TransactionManager.
If the user would try to reset the transaction for retry after such an
abort, the TransactionManager would throw an IllegalStateException,
because it did not know that the transaction had actually aborted.

Fixes googleapis#5951
@olavloite olavloite force-pushed the spanner-jdbc-cleanup-05-add-missing-test-cases branch from a166f12 to 337834b Compare August 1, 2019 16:15
@olavloite
Copy link
Author

Will review after rebase :)

Done rebasing, and I cherry-picked the fix for #5951 into this PR in order to prevent the JdbcAbortedTransactionTest to fail.

Copy link
Contributor

@kolea2 kolea2 left a comment

Choose a reason for hiding this comment

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

LGTM after copyright year updates and taking stress tests out of this PR.

@@ -0,0 +1,110 @@
/*
* Copyright 2018 Google LLC
Copy link
Contributor

Choose a reason for hiding this comment

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

2019

@@ -0,0 +1,183 @@
/*
* Copyright 2018 Google LLC
Copy link
Contributor

Choose a reason for hiding this comment

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

2019

@@ -0,0 +1,155 @@
/*
* Copyright 2018 Google LLC
Copy link
Contributor

Choose a reason for hiding this comment

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

2019

@@ -0,0 +1,66 @@
/*
* Copyright 2018 Google LLC
Copy link
Contributor

Choose a reason for hiding this comment

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

2019

@@ -0,0 +1,180 @@
/*
* Copyright 2018 Google LLC
Copy link
Contributor

Choose a reason for hiding this comment

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

2019

@@ -0,0 +1,69 @@
/*
* Copyright 2018 Google LLC
Copy link
Contributor

Choose a reason for hiding this comment

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

2019

@@ -0,0 +1,961 @@
/*
* Copyright 2018 Google LLC
Copy link
Contributor

Choose a reason for hiding this comment

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

2019

@@ -0,0 +1,548 @@
/*
Copy link
Contributor

Choose a reason for hiding this comment

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

This is great, but I don't think this is the appropriate place to put this type of test alongside other JUnit tests. For example, we have a different module for our conformance tests - not sure if we should think about a new module for stress testing.

That said, can we move this to a future PR after we think about it some more?

@olavloite
Copy link
Author

Removed stress tests and updated copyright years.

Note that the stress tests were not executed alongside with the unit tests, as they were added to a test group that was excluded from normal test execution. If we want to add these back to the library, we should also add this exclusion again to prevent test execution from taking too much time.

@olavloite olavloite merged commit 6881edd into googleapis:spanner-jdbc Aug 2, 2019
olavloite added a commit to olavloite/google-cloud-java that referenced this pull request Aug 5, 2019
)

* move remaining unit tests into public repo

* handle aborted transactions when using TransactionManager

Aborted transactions were not handled correctly by the executeUpdate and
batchUpdate methods when used in combination with a TransactionManager.
If the user would try to reset the transaction for retry after such an
abort, the TransactionManager would throw an IllegalStateException,
because it did not know that the transaction had actually aborted.

Fixes googleapis#5951

* update CR years

* removed stress tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants