Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Add system test for Database convenience methods: #3385

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

Merged
merged 1 commit into from
May 9, 2017
Merged

Add system test for Database convenience methods: #3385

merged 1 commit into from
May 9, 2017

Conversation

tseaver
Copy link
Contributor

@tseaver tseaver commented May 8, 2017

  • batch
  • snapshot
  • read
  • run_with_transaction
  • execute_sql

Closes #3015.

@tseaver tseaver added api: spanner Issues related to the Spanner API. release blocking Required feature/issue must be fixed prior to next release. testing labels May 8, 2017
@tseaver tseaver requested review from lukesneeringer and dhermes May 8, 2017 22:00
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label May 8, 2017
Copy link
Contributor

@dhermes dhermes left a comment

Choose a reason for hiding this comment

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

Looks mostly fine

@@ -228,16 +247,49 @@ def test_update_database_ddl(self):

self.assertEqual(len(temp_db.ddl_statements), len(DDL_STATEMENTS))

def test_db_batch_insert_then_db_snapshot_read_and_db_read(self):
from google.cloud.spanner import KeySet

This comment was marked as spam.

This comment was marked as spam.

@@ -228,16 +247,49 @@ def test_update_database_ddl(self):

self.assertEqual(len(temp_db.ddl_statements), len(DDL_STATEMENTS))

def test_db_batch_insert_then_db_snapshot_read_and_db_read(self):
from google.cloud.spanner import KeySet
keyset = KeySet(all_=True)

This comment was marked as spam.

This comment was marked as spam.

retry(self._db.reload)()

with self._db.batch() as batch:
batch.delete(self.TABLE, keyset)

This comment was marked as spam.

This comment was marked as spam.

batch.insert(self.TABLE, self.COLUMNS, self.ROW_DATA)

with self._db.snapshot(read_timestamp=batch.committed) as snapshot:
from_snap = list(snapshot.read( self.TABLE, self.COLUMNS, keyset))

This comment was marked as spam.

with self._db.batch() as batch:
batch.delete(self.TABLE, keyset)

def _unit_of_work(transaction, test):

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@tseaver
Copy link
Contributor Author

tseaver commented May 8, 2017

Should I follow suit and push the updated branch to the origin to get a build with system tests? We could close this PR and re-open there.

- batch
- snapshot
- read
- run_with_transaction
- execute_sql

Closes #3015.
@dhermes
Copy link
Contributor

dhermes commented May 8, 2017

@tseaver Yes I think you should push this branch to the GCP origin to get system tests running. You don't need to close this PR though, the tests will "just work" (i.e. be associated here).

@tseaver
Copy link
Contributor Author

tseaver commented May 8, 2017

Pushed to upstream.

@tseaver
Copy link
Contributor Author

tseaver commented May 9, 2017

@dhermes New system tests pass on CI. Any further issues?

@dhermes
Copy link
Contributor

dhermes commented May 9, 2017

LGTM

@tseaver tseaver merged commit 19315e0 into googleapis:master May 9, 2017
@tseaver tseaver deleted the 3015-spanner-convnience_wrapper_systests branch May 9, 2017 20:05
parthea pushed a commit that referenced this pull request Sep 22, 2023
…on-docs-samples#3385)

* video: use flaky on flaky timeouts

* Update beta_snippets_test.py

* remove api result check

* Update beta_snippets_test.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: spanner Issues related to the Spanner API. cla: yes This human has signed the Contributor License Agreement. release blocking Required feature/issue must be fixed prior to next release. testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.