Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

test: make_AsyncJob tests mock at a lower layer#340

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
tswast merged 2 commits intogoogleapis:masterfromtswast:issue339-asyncjob
Oct 26, 2020

Conversation

@tswast
Copy link
Contributor

This is intented to make the_AsyncJob tests more robust
to changes in retry behavior. It also more explicitly tests
the retry behavior by observing API calls rather than calls
to certain methods.

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open an issue as abug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes#339 🦕

This is intented to make the `_AsyncJob` tests more robustto changes in retry behavior. It also more explicitly teststhe retry behavior by observing API calls rather than callsto certain methods.
@tswasttswast requested a review froma teamOctober 23, 2020 16:56
@google-clagoogle-clabot added the cla: yesThis human has signed the Contributor License Agreement. labelOct 23, 2020
# policy passed to it, so we don't throw a non-retriable
# exception here. See:
# https://github.com/googleapis/python-bigquery/issues/24
_make_retriable_exception(),
Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

@IlyaFaer You should be able to verify your changes in#41 by changing this from_make_retriable_exception() toNotFound as is done a few lines above.

raiseNotImplementedError("Abstract")
returncopy.deepcopy(self._properties)

_build_resource=to_api_repr# backward-compatibility alias
Copy link
Contributor

Choose a reason for hiding this comment

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

This all LGTM, but I'm curious what this backwards compatibility is for here. It's not clear to me why we were specifically testing to make sure this would raise NotImplementedError before.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

It's not clear to me why we were specifically testing to make sure this would raise NotImplementedError before.

I think that was solely to make sure the coverage tests pass. We're still doing a bit of funny business in the*Job classes, in that most (all?) subclasses omit thestatistics property from theirto_api_repr.

I'm curious what this backwards compatibility is for here.

I don't remember, actually. I see a few hits for_build_resource in search.https://github.com/googleapis/python-bigquery/search?p=1&q=_build_resource I think_build_resource is usually the name we use for "update" methods that need to take a field mask and only populate certain fields. Jobs don't support update, so not sure why we ever had one.

@tswasttswast merged commitc9823d9 intogoogleapis:masterOct 26, 2020
@tswasttswast deleted the issue339-asyncjob branchOctober 26, 2020 15:04
gcf-merge-on-greenbot pushed a commit that referenced this pull requestOct 28, 2020
This enables checking the job status without making an API call.It also fixes an inconsistency in `QueryJob`, where a job can bereported as "done" without having the results of a `getQueryResults` APIcall.Follow-up to#340
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

1 more reviewer

@steffnaysteffnaysteffnay approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

cla: yesThis human has signed the Contributor License Agreement.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

_AsyncJob test failure

2 participants

@tswast@steffnay

[8]ページ先頭

©2009-2025 Movatter.jp