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

Allow configurable timeout for URI health-checks #85

Merged
merged 1 commit into from
Feb 6, 2019

Conversation

wdamron
Copy link

@wdamron wdamron commented Feb 6, 2019

  • Add Timeout option to UriHealthCheckOptions
  • Pass health-check CancellationToken during HTTP request within UriHealthCheck

Related to #81 and #60

@unaizorrilla
Copy link
Collaborator

Hi @wdamron

Let me a couple of days to check this, thanks for contribute on this project!

Copy link
Collaborator

@unaizorrilla unaizorrilla left a comment

Choose a reason for hiding this comment

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

Can you increment the version on dependencies.props for this modified package?

@unaizorrilla
Copy link
Collaborator

Can you create a functional tests with timeout? Probably using httbin and /delay/:n is valid to tests a timeout feature on uri health check!

@@ -44,7 +44,19 @@ public async Task<HealthCheckResult> CheckHealthAsync(HealthCheckContext context
requestMessage.Headers.Add(header.Name, header.Value);
}

var response = await httpClient.SendAsync(requestMessage);
HttpResponseMessage response;
if (_options.Timeout != TimeSpan.Zero)
Copy link
Collaborator

Choose a reason for hiding this comment

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

is _options.Timeout or item.Timeout? You need to get _options.Timeout as default parameter if is not override with specified UriOptions. Is the same pattern we have with defaultstatuscode httpmethod etc

@unaizorrilla unaizorrilla merged commit e17d9f4 into Xabaril:master Feb 6, 2019
@unaizorrilla
Copy link
Collaborator

In order to close this feature and publish a new package I address the feedback and merge your changes. Thanks for contribute

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.

2 participants