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

Break long poll loop early when context remaining timeout is too low #1123

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

vytautas-karpavicius
Copy link
Contributor

What changed?
Stop long poll on the client side when too little time is left on the context.

Why?
To prevent unnecessary call to the server will would timeout anyway.

Relate Server PR: cadence-workflow/cadence#4425

How did you test it?
Locally.

Potential risks

@coveralls
Copy link

coveralls commented Aug 31, 2021

Pull Request Test Coverage Report for Build 045dc6fd-ee25-4797-9592-38002509929e

  • 5 of 7 (71.43%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.02%) to 71.54%

Changes Missing Coverage Covered Lines Changed/Added Lines %
internal/internal_workflow_client.go 5 7 71.43%
Totals Coverage Status
Change from base Build 824b8973-99ad-4f10-9ea7-7b04277109c0: 0.02%
Covered Lines: 12174
Relevant Lines: 17017

💛 - Coveralls

@meiliang86 meiliang86 requested a review from Groxx September 30, 2021 04:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants