Skip to content

Add systests for read/query w/ concurrent updates. - #3632

Merged
tseaver merged 5 commits into
googleapis:masterfrom
tseaver:spanner-systests-read-query-concurrent-update
Jul 20, 2017
Merged

Add systests for read/query w/ concurrent updates.#3632
tseaver merged 5 commits into
googleapis:masterfrom
tseaver:spanner-systests-read-query-concurrent-update

Conversation

@tseaver

Copy link
Copy Markdown
Contributor

No description provided.

@tseavertseaver added api: spanner Issues related to the Spanner API. testing labels Jul 19, 2017
@googlebotgooglebot added the cla: yes This human has signed the Contributor License Agreement. label Jul 19, 2017

@dhermesdhermes left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM pending green CI (should you push a branch to the GCP remote so we can see the system tests?)

Comment threadspanner/tests/system/test_system.py Outdated
self._check_row_data(rows)

def _transaction_concurrency_helper(self, unit_of_work, pkey):
import threading

This comment was marked as spam.

This comment was marked as spam.

[[pkey, INITIAL_VALUE]])

# We don't want to run the threads' transactions in the current
# session, which would fail.

This comment was marked as spam.

This comment was marked as spam.

Comment threadspanner/tests/system/test_system.py Outdated
self.assertEqual(len(rows), 1)
pkey, value = rows[0]
transaction.update(
self.COUNTERS_TABLE,

This comment was marked as spam.

This comment was marked as spam.

@tseaver

Copy link
Copy Markdown
ContributorAuthor

Test failures look unrelated to our code :<

@theacodes

Copy link
Copy Markdown
Contributor

@tseaver I'm working on it, it's a problem in our base image.

Comment threadspanner/tests/system/test_system.py Outdated
retry = RetryInstanceState(_has_all_ddl)
retry(self._db.reload)()

class TestException(Exception):

This comment was marked as spam.

This comment was marked as spam.


with session.batch() as batch:
batch.delete(self.TABLE, self.ALL)

This comment was marked as spam.

This comment was marked as spam.

@theacodes

Copy link
Copy Markdown
Contributor

@tseaver I'm working on it, it's a problem in our base image.

Base image fixed, any test failures are no longer my fault. :)

Comment threadspanner/tests/system/test_system.py Outdated
rows = list(transaction.read(self.TABLE, self.COLUMNS, self.ALL))
self.assertEqual(len(rows), 0)
transaction.insert(self.TABLE, self.COLUMNS, self.ROW_DATA)
raise TestException()

This comment was marked as spam.

@dhermes

Copy link
Copy Markdown
Contributor

@tseaver I presume https://circleci.com/gh/GoogleCloudPlatform/google-cloud-python/2453 is the build in the GCP remote?

@dhermes

Copy link
Copy Markdown
Contributor

@tseaver Rename your custom exception? pytest is trying to collect it:

tests/system/test_system.py::TestException
cannot collect test class 'TestException' because it has a __init__ constructor
-- Docs: http://doc.pytest.org/en/latest/warnings.html

@tseaver

Copy link
Copy Markdown
ContributorAuthor

Ugh, failures are now due to BQ system test flakiness, Why are we running tests for the other APIs again?

@dhermes

Copy link
Copy Markdown
Contributor

Why are we running tests for the other APIs again?

Because no on (you or I included) has written tooling to make the build aware of what it should be building. The relevant code is here https://github.com/GoogleCloudPlatform/google-cloud-python/blob/3d9461b91963fcc6e6a864f6f0eacad3d92bbf2d/test_utils/scripts/get_target_packages.py but IMO it's not worth it since we're breaking up the monorepo soon.

@tseaver

Copy link
Copy Markdown
ContributorAuthor

Breaking up the monorepo doesn't seem to be high up on anybody's priority list ATM.

@tseaver
tseaver merged commit f8758df into googleapis:masterJul 20, 2017
@tseaver
tseaver deleted the spanner-systests-read-query-concurrent-update branch July 20, 2017 22:18
landrito pushed a commit to landrito/google-cloud-python that referenced this pull request Aug 21, 2017
* Also add systest for user exception aborting transaction.
landrito pushed a commit to landrito/google-cloud-python that referenced this pull request Aug 22, 2017
* Also add systest for user exception aborting transaction.
landrito pushed a commit to landrito/google-cloud-python that referenced this pull request Aug 22, 2017
* Also add systest for user exception aborting transaction.
parthea pushed a commit that referenced this pull request Mar 9, 2026
* Also add systest for user exception aborting transaction.
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: spannerIssues related to the Spanner API.cla: yesThis human has signed the Contributor License Agreement.testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@tseaver@theacodes@dhermes@googlebot