Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[dialogflow] fix: marking a test with flaky
Browse files Browse the repository at this point in the history
fixes #3490
Takashi Matsuo committed May 2, 2020
1 parent af91571 commit 10cd0a1
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions dialogflow/cloud-client/create_document_test.py
Original file line number Diff line number Diff line change
@@ -47,6 +47,7 @@ def setup_teardown():
client.delete_knowledge_base(knowledge_base_path, force=True)


@pytest.mark.flaky(max_runs=3, min_passes=1)
def test_create_document(capsys):
document_management.create_document(
PROJECT_ID, pytest.KNOWLEDGE_BASE_ID, DOCUMENT_DISPLAY_NAME,
2 changes: 1 addition & 1 deletion dialogflow/cloud-client/document_management.py
Original file line number Diff line number Diff line change
@@ -60,7 +60,7 @@ def create_document(project_id, knowledge_base_id, display_name, mime_type,

response = client.create_document(knowledge_base_path, document)
print('Waiting for results...')
document = response.result(timeout=90)
document = response.result(timeout=120)
print('Created Document:')
print(' - Display Name: {}'.format(document.display_name))
print(' - Knowledge ID: {}'.format(document.name))
1 change: 1 addition & 0 deletions dialogflow/cloud-client/requirements-test.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
pytest==5.3.2
flaky==3.6.1

0 comments on commit 10cd0a1

Please sign in to comment.