Skip to content
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

Updating datastore system test to allow concurrent runs. #1370

Merged
merged 1 commit into from
Jan 14, 2016

Conversation

dhermes
Copy link
Contributor

@dhermes dhermes commented Jan 8, 2016

Using a namespace for any key which is changed (inserted/deleted) so that concurrent tests don't operate on the same data. The one exception is TestDatastoreQuery which depends on entities which need to be already stored and indexed before running. For this test case, a new client is created without any namespace.

NOTE: Has #1369 as diffbase.

Inspired by #1363.

@dhermes dhermes added api: datastore Issues related to the Datastore API. testing labels Jan 8, 2016
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jan 8, 2016
if EMULATOR_DATASET is not None:
clear_datastore.remove_all_entities(client=Config.CLIENT)
Config.CLIENT = datastore.Client(dataset_id=EMULATOR_DATASET,
namespace=TEST_NAMESPACE)

This comment was marked as spam.

This comment was marked as spam.

@dhermes
Copy link
Contributor Author

dhermes commented Jan 14, 2016

@tseaver FYI #1383 should be merged before this.

@dhermes dhermes force-pushed the ds-system-test-namespace branch 2 times, most recently from 4cbeada to 49f8a23 Compare January 14, 2016 21:13
@dhermes
Copy link
Contributor Author

dhermes commented Jan 14, 2016

LuLz. Pushed a test key.

Using a namespace for any key which is changed (inserted/deleted)
so that concurrent tests don't operate on the same data. The
one exception is `TestDatastoreQuery` which depends on entities
which need to be already stored and indexed before running. For
this test case, a new client is created without any namespace.
if EMULATOR_DATASET is not None:
clear_datastore.remove_all_entities(client=Config.CLIENT)
Config.CLIENT = datastore.Client(project=EMULATOR_DATASET,
namespace=TEST_NAMESPACE)

This comment was marked as spam.

This comment was marked as spam.

dhermes added a commit that referenced this pull request Jan 14, 2016
Updating datastore system test to allow concurrent runs.
@dhermes dhermes merged commit aca137f into googleapis:master Jan 14, 2016
@dhermes dhermes deleted the ds-system-test-namespace branch January 14, 2016 21:28
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. testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants