Skip to content

Commit

Permalink
[healthcare] chore: remove gcp-devrel-py-tools (#3476)
Browse files Browse the repository at this point in the history
  • Loading branch information
Takashi Matsuo authored Apr 23, 2020
1 parent 58e9e91 commit c02e993
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 9 deletions.
23 changes: 16 additions & 7 deletions healthcare/api-client/hl7v2/hl7v2_messages_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import sys
import uuid

from gcp_devrel.testing import eventually_consistent
import backoff

# Add datasets for bootstrapping datasets for testing
sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'datasets')) # noqa
Expand Down Expand Up @@ -83,8 +83,9 @@ def test_CRUD_hl7v2_message(test_dataset, test_hl7v2_store, capsys):
hl7v2_message_file)

hl7v2_message_id = ""
@eventually_consistent.call
def _():

@backoff.on_exception(backoff.expo, AssertionError, max_time=60)
def eventually_consistent_test():
hl7v2_messages_list = hl7v2_messages.list_hl7v2_messages(
service_account_json,
project_id,
Expand All @@ -97,6 +98,8 @@ def _():
nonlocal hl7v2_message_id
hl7v2_message_id = hl7v2_message_name.split('/', 9)[9]

eventually_consistent_test()

hl7v2_messages.get_hl7v2_message(
service_account_json,
project_id,
Expand Down Expand Up @@ -131,8 +134,9 @@ def test_ingest_hl7v2_message(test_dataset, test_hl7v2_store, capsys):
hl7v2_message_file)

hl7v2_message_id = ""
@eventually_consistent.call
def _():

@backoff.on_exception(backoff.expo, AssertionError, max_time=60)
def eventually_consistent_test():
hl7v2_messages_list = hl7v2_messages.list_hl7v2_messages(
service_account_json,
project_id,
Expand All @@ -145,6 +149,8 @@ def _():
nonlocal hl7v2_message_id
hl7v2_message_id = hl7v2_message_name.split('/', 9)[9]

eventually_consistent_test()

hl7v2_messages.get_hl7v2_message(
service_account_json,
project_id,
Expand Down Expand Up @@ -179,8 +185,9 @@ def test_patch_hl7v2_message(test_dataset, test_hl7v2_store, capsys):
hl7v2_message_file)

hl7v2_message_id = ""
@eventually_consistent.call
def _():

@backoff.on_exception(backoff.expo, AssertionError, max_time=60)
def eventually_consistent_test():
hl7v2_messages_list = hl7v2_messages.list_hl7v2_messages(
service_account_json,
project_id,
Expand All @@ -193,6 +200,8 @@ def _():
nonlocal hl7v2_message_id
hl7v2_message_id = hl7v2_message_name.split('/', 9)[9]

eventually_consistent_test()

hl7v2_messages.patch_hl7v2_message(
service_account_json,
project_id,
Expand Down
3 changes: 1 addition & 2 deletions healthcare/api-client/hl7v2/requirements-test.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
backoff==1.10.0
pytest==5.3.2
gcp-devrel-py-tools==0.0.15
google-cloud-core

0 comments on commit c02e993

Please sign in to comment.