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

dialogflow: use unique names for all resources for tests to avoid col… #2696

Merged
merged 12 commits into from
Jan 17, 2020

Conversation

nnegrey
Copy link
Contributor

@nnegrey nnegrey commented Jan 8, 2020

…lision

@nnegrey nnegrey requested a review from a team as a code owner January 8, 2020 21:40
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jan 8, 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.

Tests are failing do to quota. Maybe something is wrong with the test project.

@nnegrey
Copy link
Contributor Author

nnegrey commented Jan 8, 2020

I think the problem is way back when these tests were written they all sorta rely on one machine running them at a time, now with 4 in parallel some of the requests are expecting to list one resource but find multiple and that is one problem.

I'm breaking the tests up into individual files and have proper setup teardown rather than rely on them running in order which some do.

@nnegrey
Copy link
Contributor Author

nnegrey commented Jan 9, 2020

Alright looks like I need to request a quota increase, it caps out at 60 requests per minute and with 4 different versions running at once that is quite soon.

pytest.KNOWLEDGE_BASE_ID = None


@pytest.fixture(scope="function", autouse=True)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@gguuss, while I wait for the quota increase.

How do you feel about these types of tests?

I was gonna modify the rest and separate them into individual files in different PRs, but the current Knowledge and Document tests were checking that only 1 thing existing, so I at least had to update those for the 4 python versions.

Copy link
Contributor

@gguuss gguuss Jan 14, 2020

Choose a reason for hiding this comment

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

I'm fine for checking that all the response parameters are there but adding more detailed checks, particularly in ML APIs, can make the checks more brittle. If these are mocks, then it diverges a bit from the spirit of doing integration testing to make sure we see whether our p;roducts are encountering outages or the client libraries are breaking.

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.

@gguuss
Copy link
Contributor

gguuss commented Jan 14, 2020

@nnegrey I think you should be able to merge when green, just lmk if you need me to take a look again.

@nnegrey
Copy link
Contributor Author

nnegrey commented Jan 14, 2020

Getting errors about the long running client:

AttributeError: module 'google.longrunning.operations_pb2' has no attribute 'OperationsStub'

Let me see if something changed in the client or something.

@nnegrey
Copy link
Contributor Author

nnegrey commented Jan 17, 2020

I believe these tests failed cus the old tests ran over night and caused some issues cus they fail on multiple run times of python.

@nnegrey
Copy link
Contributor Author

nnegrey commented Jan 17, 2020

I have a couple PRs ready to fix those oddities, but this one should go first.

@nnegrey nnegrey merged commit ead0697 into master Jan 17, 2020
@nnegrey nnegrey deleted the dialogflow-unique-names branch January 17, 2020 23:14
busunkim96 pushed a commit to busunkim96/dialogflow-python-client-v2 that referenced this pull request Nov 30, 2020
…… [(#2696)](GoogleCloudPlatform/python-docs-samples#2696)

* dialogflow: use unique names for all resources for tests to avoid collision

* lint: line length

* break up knowledge base tests and document tests from one file into individual tests

* lint

* bump library version

* ping googleapis-common-protos to avoid release breakage

* Update requirements.txt

Co-authored-by: Gus Class <[email protected]>
busunkim96 pushed a commit to googleapis/python-dialogflow that referenced this pull request Dec 9, 2020
…… [(#2696)](GoogleCloudPlatform/python-docs-samples#2696)

* dialogflow: use unique names for all resources for tests to avoid collision

* lint: line length

* break up knowledge base tests and document tests from one file into individual tests

* lint

* bump library version

* ping googleapis-common-protos to avoid release breakage

* Update requirements.txt

Co-authored-by: Gus Class <[email protected]>
telpirion pushed a commit that referenced this pull request Jan 18, 2023
…… [(#2696)](#2696)

* dialogflow: use unique names for all resources for tests to avoid collision

* lint: line length

* break up knowledge base tests and document tests from one file into individual tests

* lint

* bump library version

* ping googleapis-common-protos to avoid release breakage

* Update requirements.txt

Co-authored-by: Gus Class <[email protected]>
dandhlee pushed a commit that referenced this pull request Feb 6, 2023
…… [(#2696)](#2696)

* dialogflow: use unique names for all resources for tests to avoid collision

* lint: line length

* break up knowledge base tests and document tests from one file into individual tests

* lint

* bump library version

* ping googleapis-common-protos to avoid release breakage

* Update requirements.txt

Co-authored-by: Gus Class <[email protected]>
telpirion pushed a commit that referenced this pull request Mar 13, 2023
…… [(#2696)](#2696)

* dialogflow: use unique names for all resources for tests to avoid collision

* lint: line length

* break up knowledge base tests and document tests from one file into individual tests

* lint

* bump library version

* ping googleapis-common-protos to avoid release breakage

* Update requirements.txt

Co-authored-by: Gus Class <[email protected]>
vchudnov-g pushed a commit to googleapis/google-cloud-python that referenced this pull request Sep 20, 2023
…… [(#2696)](GoogleCloudPlatform/python-docs-samples#2696)

* dialogflow: use unique names for all resources for tests to avoid collision

* lint: line length

* break up knowledge base tests and document tests from one file into individual tests

* lint

* bump library version

* ping googleapis-common-protos to avoid release breakage

* Update requirements.txt

Co-authored-by: Gus Class <[email protected]>
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
Development

Successfully merging this pull request may close these issues.

3 participants