Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion jobs/v3/api_client/auto_complete_sample_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def company_name():


def test_auto_complete_sample(company_name, capsys):
@eventually_consistent.call
@eventually_consistent.call(tries=5)
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we switch to flaky or retry over eventually_consistent ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@kurtisvg Thanks for the comment. To be honest, we have different opinions.

I think eventually_consistent has some benefit. It gives semantics.

It marks the tests as eventually consistent, which means it is a correct thing to retry.
I quite don't like to use flaky or retry for eventually consistent tests, because we can not distinguish eventually consistent tests from usual flakes.

Also, it is a great shortcut for eventually consistent issues with exponential back off. There's no need for defining helper callback.

So, for eventually consistent tests, I strongly want to stick with eventually_consistent.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So, if we ultimately decide to eliminate gcp-devrel-py-tools, I'll replace eventually_consistent with retrying. However, I'll stick to eventally_consistent in this PR.

Can you file an issue for eliminating gcp-devrel-py-tools so that we can discuss further there?

def _():
auto_complete_sample.run_sample(company_name)
out, _ = capsys.readouterr()
Expand Down
2 changes: 1 addition & 1 deletion jobs/v3/api_client/commute_search_sample_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def company_name():


def test_commute_search_sample(company_name, capsys):
@eventually_consistent.call
@eventually_consistent.call(tries=5)
def _():
commute_search_sample.run_sample(company_name)
out, _ = capsys.readouterr()
Expand Down
2 changes: 1 addition & 1 deletion jobs/v3/api_client/custom_attribute_sample_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def create_data():


def test_custom_attribute_sample(create_data, capsys):
@eventually_consistent.call
@eventually_consistent.call(tries=5)
def _():
custom_attribute_sample.run_sample()
out, _ = capsys.readouterr()
Expand Down
2 changes: 1 addition & 1 deletion jobs/v3/api_client/email_alert_search_sample_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def company_name():


def test_email_alert_search_sample(company_name, capsys):
@eventually_consistent.call
@eventually_consistent.call(tries=5)
def _():
email_alert_search_sample.run_sample(company_name)
out, _ = capsys.readouterr()
Expand Down
2 changes: 1 addition & 1 deletion jobs/v3/api_client/featured_job_search_sample_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def company_name():


def test_featured_job_search_sample(company_name, capsys):
@eventually_consistent.call
@eventually_consistent.call(tries=5)
def _():
featured_job_search_sample.run_sample(company_name)
out, _ = capsys.readouterr()
Expand Down
2 changes: 1 addition & 1 deletion jobs/v3/api_client/general_search_sample_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def company_and_job():


def test_general_search_sample(company_and_job, capsys):
@eventually_consistent.call
@eventually_consistent.call(tries=5)
def _():
general_search_sample.run_sample(
company_and_job[0], company_and_job[1])
Expand Down
2 changes: 1 addition & 1 deletion jobs/v3/api_client/histogram_sample_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def company_name():


def test_histogram_sample(company_name, capsys):
@eventually_consistent.call
@eventually_consistent.call(tries=5)
def _():
histogram_sample.run_sample(company_name)
out, _ = capsys.readouterr()
Expand Down
2 changes: 1 addition & 1 deletion jobs/v3/api_client/location_search_sample_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def company_name():


def test_location_search_sample(company_name, capsys):
@eventually_consistent.call
@eventually_consistent.call(tries=5)
def _():
location_search_sample.run_sample(company_name)
out, _ = capsys.readouterr()
Expand Down
3 changes: 1 addition & 2 deletions jobs/v3/api_client/requirements-test.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
pytest==5.3.2
gcp-devrel-py-tools==0.0.15
google-cloud-core
gcp-devrel-py-tools==0.0.16
flaky==3.6.1