Skip to content

Add integration tests and remote test helper for Datastore#1226

Merged
mziccard merged 3 commits intogoogleapis:masterfrom
mziccard:datastore-its
Sep 28, 2016
Merged

Add integration tests and remote test helper for Datastore#1226
mziccard merged 3 commits intogoogleapis:masterfrom
mziccard:datastore-its

Conversation

@mziccard
Copy link
Copy Markdown
Contributor

@mziccard mziccard commented Sep 6, 2016

No description provided.

@mziccard mziccard added api: datastore Issues related to the Datastore API. testing labels Sep 6, 2016
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Sep 6, 2016
@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.06%) to 85.142% when pulling e23ddbf on mziccard:datastore-its into 8cf6a66 on GoogleCloudPlatform:master.

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.06%) to 84.824% when pulling 72e0d3a on mziccard:datastore-its into 9c840d6 on GoogleCloudPlatform:master.

@mziccard
Copy link
Copy Markdown
Contributor Author

/cc @lesv

@lesv
Copy link
Copy Markdown
Contributor

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
Copy link
Copy Markdown
Contributor Author

you would find that datastore can be flakey

This is a good point. Queries can be eventually consistent in datastore, I'll add some come to handle such cases.

@mziccard
Copy link
Copy Markdown
Contributor Author

/cc @lesv I updated tests to handle query's eventual consistency.

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.06%) to 84.545% when pulling 199bd61 on mziccard:datastore-its into f50a31f on GoogleCloudPlatform:master.

Copy link
Copy Markdown
Contributor

@lesv lesv left a comment

Choose a reason for hiding this comment

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

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.

}

try {
transaction.rollback();

This comment was marked as spam.

This comment was marked as spam.

transaction.commit();
fail("Expecting a failure");
} catch (DatastoreException ex) {
// expected to fail

This comment was marked as spam.

transaction.rollback();
fail("Expecting a failure");
} catch (DatastoreException ex) {
// expected to fail

This comment was marked as spam.

This comment was marked as spam.

}
}

@Test

This comment was marked as spam.

This comment was marked as spam.

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.

assertEquals(6, entities.size());
}

@Test

This comment was marked as spam.

assertFalse(keyProjectionResult.hasNext());
}

@Test

This comment was marked as spam.

assertFalse(results3.hasNext());
}

@Test

This comment was marked as spam.

@lesv
Copy link
Copy Markdown
Contributor

lesv commented Sep 26, 2016

PTAL

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.06%) to 84.547% when pulling 0ee880f on mziccard:datastore-its into f50a31f on GoogleCloudPlatform:master.

@lesv
Copy link
Copy Markdown
Contributor

lesv commented Sep 27, 2016

LGTM

@mziccard mziccard merged commit 0e61bd3 into googleapis:master Sep 28, 2016
github-actions Bot pushed a commit that referenced this pull request Aug 25, 2022
🤖 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).
meltsufin pushed a commit that referenced this pull request Dec 22, 2025
🤖 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).
chingor13 pushed a commit that referenced this pull request Jan 6, 2026
…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>
chingor13 pushed a commit that referenced this pull request Jan 22, 2026
chingor13 pushed a commit that referenced this pull request Feb 24, 2026
* 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
suztomo pushed a commit to suztomo/google-cloud-java that referenced this pull request Mar 11, 2026
chingor13 pushed a commit that referenced this pull request Mar 12, 2026
* 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
suztomo pushed a commit to suztomo/google-cloud-java that referenced this pull request Mar 23, 2026
suztomo pushed a commit that referenced this pull request Mar 30, 2026
* 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] <[email protected]>

* 🦉 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] <[email protected]>
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>
lqiu96 pushed a commit that referenced this pull request Apr 1, 2026
* 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] <[email protected]>

* 🦉 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] <[email protected]>
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>
meltsufin pushed a commit that referenced this pull request Apr 29, 2026
…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>
meltsufin pushed a commit that referenced this pull request Apr 29, 2026
🤖 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).
meltsufin pushed a commit that referenced this pull request May 1, 2026
…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>
meltsufin pushed a commit that referenced this pull request May 1, 2026
🤖 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).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: datastore Issues related to the Datastore API. cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants