Skip to content

Conversation

@tseaver
Copy link
Contributor

@tseaver tseaver commented Aug 11, 2016

Fixes #2075.

@tseaver tseaver added testing api: bigquery Issues related to the BigQuery API. labels Aug 11, 2016
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Aug 11, 2016

# We need to wait to stay within the rate limits.
# The alternative outcome is a 403 Forbidden response from upstream.
# See: https://cloud.google.com/bigquery/quota-policy

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

A 429 ("Too many requests") would be way more appropriate than a 403
("Forbidden"), but there is nothing we can do about it here.

Addresses:
#2089 (comment)
@dhermes
Copy link
Contributor

dhermes commented Aug 11, 2016

Re: the error predicate -- I'm reluctant to add it because it makes the test flakier with respect to the back-end, which might change the error text arbitrarily and without notice.

We could deal with backend changes if / when tests fail. You can make it a bit less brittle via:

'rate limit' in error.message.lower()

@tseaver
Copy link
Contributor Author

tseaver commented Aug 11, 2016

In 10e4f51, I figured out that we capture the JSON error structure, which means we can use the documented rateLimitExceeded reason code, rather than sniffing at the message text.

Exclude Forbidden exceptions which do not have 'rateLimitExceed' as the
reason for one of their errors.

Addresses:
#2089 (comment).
@dhermes
Copy link
Contributor

dhermes commented Aug 11, 2016

Nice find! LGTM

@tseaver tseaver merged commit a99f269 into googleapis:master Aug 11, 2016
@tseaver tseaver deleted the 2075-bigquery-flaky-system-tests branch August 11, 2016 21:09
@dhermes dhermes mentioned this pull request Sep 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: bigquery Issues related to the BigQuery 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