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

Appearance settings

Commit bfa48d4

Browse filesBrowse files
author
Takashi Matsuo
authored
fix(healthcare): retry flaky test (GoogleCloudPlatform#5302)
fixes GoogleCloudPlatform#5262
1 parent f0890ac commit bfa48d4
Copy full SHA for bfa48d4

File tree

Expand file treeCollapse file tree

1 file changed

+10
-3
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+10
-3
lines changed

‎healthcare/api-client/v1beta1/fhir/fhir_stores_test.py

Copy file name to clipboardExpand all lines: healthcare/api-client/v1beta1/fhir/fhir_stores_test.py
+10-3Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@
1515
import os
1616
import uuid
1717

18+
import backoff
1819
import pytest
20+
from requests.exceptions import HTTPError
1921

2022
import fhir_stores # noqa
2123

@@ -57,9 +59,14 @@ def test_fhir_store():
5759

5860

5961
def test_create_delete_fhir_store(test_dataset, capsys):
60-
fhir_stores.create_fhir_store(
61-
service_account_json, project_id, cloud_region, dataset_id, fhir_store_id
62-
)
62+
# We see HttpErrors with "dataset not initialized" message.
63+
# I think retry will mitigate the flake.
64+
@backoff.on_exception(backoff.expo, HTTPError, max_time=120)
65+
def create():
66+
fhir_stores.create_fhir_store(
67+
service_account_json, project_id, cloud_region, dataset_id, fhir_store_id
68+
)
69+
create()
6370

6471
fhir_stores.delete_fhir_store(
6572
service_account_json, project_id, cloud_region, dataset_id, fhir_store_id

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.