Uh oh!
There was an error while loading. Please reload this page.
Add integration tests and remote test helper for Datastore - #1226
Conversation
coveralls
commented
Sep 6, 2016
e23ddbf to
72e0d3aComparecoveralls
commented
Sep 13, 2016
mziccard
commented
Sep 13, 2016
/cc @lesv |
lesv
commented
Sep 13, 2016
LGTM - However, while in practice, this shouldn't happen, if you were to run this against the Datastore Emulator, you would find that datastore can be flakey. (as consistency is by default 0.9) I don't know if you'd want to put in code to address this, but I thought I'd mention it. (Note - I have seen this in production as well, but it's been a while). |
mziccard
commented
Sep 14, 2016
This is a good point. Queries can be eventually consistent in datastore, I'll add some come to handle such cases. |
72e0d3a to
199bd61Comparemziccard
commented
Sep 26, 2016
/cc @lesv I updated tests to handle query's eventual consistency. |
coveralls
commented
Sep 26, 2016
lesv
left a comment
There was a problem hiding this comment.
Timeouts for tests of eventual consistency seems like a good idea, 65 or 129 seconds seems good for our purposes. (Though I've heard, but can't find documentation for longer times).
My ask to move the asserts probably isn't required for this scenario as crashing is a good thing here.
| assertNull(list.get(0)); | ||
| assertEquals(entity2, list.get(1)); | ||
| assertEquals(ENTITY3, list.get(2)); | ||
| assertEquals(3, list.size()); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
| } | ||
| try { | ||
| transaction.rollback(); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
| transaction.commit(); | ||
| fail("Expecting a failure"); | ||
| } catch (DatastoreException ex) { | ||
| // expected to fail |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
| transaction.rollback(); | ||
| fail("Expecting a failure"); | ||
| } catch (DatastoreException ex) { | ||
| // expected to fail |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
| } | ||
| } | ||
| @Test |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
| assertEquals(entity4, entities.get(3)); | ||
| assertEquals(entity5, entities.get(4)); | ||
| assertEquals(entity6, entities.get(5)); | ||
| assertEquals(6, entities.size()); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
| assertEquals(6, entities.size()); | ||
| } | ||
| @Test |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
| assertFalse(keyProjectionResult.hasNext()); | ||
| } | ||
| @Test |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
| assertFalse(results3.hasNext()); | ||
| } | ||
| @Test |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
lesv
commented
Sep 26, 2016
PTAL |
coveralls
commented
Sep 27, 2016
lesv
commented
Sep 27, 2016
LGTM |
🤖 I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
🤖 I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please).
…28.0 (#1226) * chore(deps): update dependency com.google.cloud:libraries-bom to v26.28.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
* chore: Update dependabot.yml Source-Link: https://togithub.com/googleapis/synthtool/commit/9ad18b66e75ca08d6a7779f56c7ee0595d3e1203 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:c33bd13e1eab022b0499a3afbfb4b93ae10cb8ad89d8203a6343a88b1b78400f
🤖 I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please).
* chore: Update dependabot.yml Source-Link: https://togithub.com/googleapis/synthtool/commit/9ad18b66e75ca08d6a7779f56c7ee0595d3e1203 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:c33bd13e1eab022b0499a3afbfb4b93ae10cb8ad89d8203a6343a88b1b78400f
* build(deps): bump certifi from 2023.5.7 to 2023.7.22 in /.kokoro Bumps [certifi](https://github.com/certifi/python-certifi) from 2023.5.7 to 2023.7.22. - [Commits](certifi/python-certifi@2023.05.07...2023.07.22) --- updated-dependencies: - dependency-name: certifi dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
* build(deps): bump certifi from 2023.5.7 to 2023.7.22 in /.kokoro Bumps [certifi](https://github.com/certifi/python-certifi) from 2023.5.7 to 2023.7.22. - [Commits](certifi/python-certifi@2023.05.07...2023.07.22) --- updated-dependencies: - dependency-name: certifi dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
…cies to v3.0.1 (#1226) * deps: update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.1 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
🤖 I have created a release *beep* *boop* --- ## [1.120.9](googleapis/java-pubsub@v1.120.8...v1.120.9) (2022-08-03) ### Dependencies * update dependency com.google.cloud:google-cloud-core to v2.8.7 ([#1227](googleapis/java-pubsub#1227)) ([e967b2c](googleapis/java-pubsub@e967b2c)) * update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.1 ([#1226](googleapis/java-pubsub#1226)) ([8fab566](googleapis/java-pubsub@8fab566)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
…cies to v3.0.1 (#1226) * deps: update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.1 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
🤖 I have created a release *beep* *boop* --- ## [1.120.9](googleapis/java-pubsub@v1.120.8...v1.120.9) (2022-08-03) ### Dependencies * update dependency com.google.cloud:google-cloud-core to v2.8.7 ([#1227](googleapis/java-pubsub#1227)) ([52fe226](googleapis/java-pubsub@52fe226)) * update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.1 ([#1226](googleapis/java-pubsub#1226)) ([9be14bf](googleapis/java-pubsub@9be14bf)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
No description provided.