8000 fix: adjust bigquery/cloud-client to allow concurrent testing by shollyman · Pull Request #3136 · GoogleCloudPlatform/python-docs-samples · GitHub
[go: up one dir, main page]

Skip to content

fix: adjust bigquery/cloud-client to allow concurrent testing #3136

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

Closed

Conversation

shollyman
Copy link
Contributor

Natality test was overly stateful. Change to optimistic dataset creation and elide truncation mode to allow for concurrent overwriting.

Fixes: #2850

@shollyman shollyman requested a review from leahecole March 24, 2020 23:42
@shollyman shollyman requested a review from a team as a code owner March 24, 2020 23:42
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Mar 24, 2020
Copy link
Contributor
@gguuss gguuss left a comment

Choose a reason for hiding this comment

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

LGTM when the tests pass. Optional change suggestion - I've been asked to avoid reusing resources in testing and instead use unique resources per-test (e.g. create a database with UUID in the name).

@shollyman
Copy link
Contributor Author

LGTM when the tests pass. Optional change suggestion - I've been asked to avoid reusing resources in testing and instead use unique resources per-test (e.g. create a database with UUID in the name).

In this case, I'm generally more okay with datasets being longlived because there's a higher expectation of persistence by users, and the dataset itself has no cost (resources inside are a different story).

if entry.entity_type != 'view']
client.update_dataset(ds, ['access_entries'])
except Exception:
pass
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: can we add a print statement at minimum here or catch a specific exception?

@shollyman
Copy link
Contributor Author

Abandoning this one for a different approach.

@shollyman shollyman closed this Apr 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet 4D0B
Development

Successfully merging this pull request may close these issues.

bigquery.cloud-client.natality_tutorial_test: test_natality_tutorial failed
5 participants
0