Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat:https://github.com/abpframework/abp/issues/21205 #21213

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

yuxl01
Copy link
Contributor

@yuxl01 yuxl01 commented Oct 30, 2024

Description

Resolves #21205(write the related issue number if available)

  1. Try to add an AbpHttpClientExecuteHttpActionOptions class to expose the current request method and httpclient for custom configuration at startup.
    image

  2. Inject options into ClientProxyBase, and add configuration execution code in the RequestAsync method that actually initiates the request.

image

  1. Code for unit tests is defined, but some problems are encountered while executing unit tests
  • The execution here cannot be successful because the service started by the unit test does not use SocketsHttpHandler for request processing. It uses the ClientHandler class under the Microsoft.AspNetCore.TestHost namespace.
    b4ce1d7a-bafc-48b5-a1a3-b9d7750814df
  • As a result, IsCancellationRequested cannot throw an exception in the closed state after timeout.
    So the desired result cannot be obtained locally. at the same time,
    I can achieve the desired effect by using other services locally
    img_v3_02g5_2c2c2792-1a6f-4c8b-b629-1a74898f90dg

Checklist

  • [√ ] I fully tested it as developer / designer and created unit / integration tests
  • [√ ] I documented it (or no need to document or I will create a separate documentation issue)

How to test it?

When the test times out, you may need to start a normal service to make the call. The problem described in point 5 occurs when using the test service.

@yuxl01
Copy link
Contributor Author

yuxl01 commented Oct 30, 2024

Why does building automated tests fail?

@maliming maliming self-requested a review October 31, 2024 06:37
@maliming maliming added this to the 9.1-preview milestone Oct 31, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Http DynamicProxying idea
2 participants