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

Support java 11 http2 client gh-689 #869

Merged
merged 5 commits into from
Jun 15, 2023

Conversation

galaxy-sea
Copy link
Contributor

Support java 11 http2 client gh-689

@codecov
Copy link

codecov bot commented Jun 14, 2023

Codecov Report

Merging #869 (c9b399d) into main (235eb6d) will increase coverage by 0.13%.
The diff coverage is 90.90%.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##               main     #869      +/-   ##
============================================
+ Coverage     77.06%   77.19%   +0.13%     
- Complexity      575      582       +7     
============================================
  Files            69       71       +2     
  Lines          2276     2298      +22     
  Branches        307      308       +1     
============================================
+ Hits           1754     1774      +20     
- Misses          355      356       +1     
- Partials        167      168       +1     
Impacted Files Coverage Δ
...adbalancer/FeignLoadBalancerAutoConfiguration.java 100.00% <ø> (ø)
...gn/clientconfig/Http2ClientFeignConfiguration.java 66.66% <66.66%> (ø)
...mework/cloud/openfeign/FeignAutoConfiguration.java 84.61% <100.00%> (+0.40%) ⬆️
...cer/Http2ClientFeignLoadBalancerConfiguration.java 100.00% <100.00%> (ø)
...d/openfeign/support/FeignHttpClientProperties.java 94.73% <100.00%> (+0.55%) ⬆️

@OlgaMaciaszek OlgaMaciaszek self-assigned this Jun 14, 2023
@OlgaMaciaszek OlgaMaciaszek added enhancement New feature or request and removed waiting-for-triage labels Jun 14, 2023
@OlgaMaciaszek OlgaMaciaszek linked an issue Jun 14, 2023 that may be closed by this pull request
@OlgaMaciaszek
Copy link
Collaborator

Fixes gh-689.

Copy link
Collaborator

@OlgaMaciaszek OlgaMaciaszek left a comment

Choose a reason for hiding this comment

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

Hello @galaxy-sea, thanks for submitting the PR. In general, it looks good. I have added some comments - please address. Will still have a second look tomorrow and probably add some more things, so you might want to wait till then with any changes.

docs/src/main/asciidoc/spring-cloud-openfeign.adoc Outdated Show resolved Hide resolved
docs/src/main/asciidoc/spring-cloud-openfeign.adoc Outdated Show resolved Hide resolved
Http2Client http2Client = (Http2Client) delegate;
HttpClient httpClient = getField(http2Client, "client");
MockingDetails httpClientDetails = mockingDetails(httpClient);
assertThat(httpClientDetails.isMock()).isTrue();
Copy link
Collaborator

Choose a reason for hiding this comment

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

What is this test verifying? Why test that a mock is a mock?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Test HttpClient bean customization

Copy link
Collaborator

Choose a reason for hiding this comment

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

It would probably be better to create a new HttpClient object (HttpClient.newHttpClient();) in the configuration and verify if it's the right type, rather than creating a mock and verifying that it's a mock.

@galaxy-sea
Copy link
Contributor Author

hello @OlgaMaciaszek , Thank you for your advice

Copy link
Collaborator

@OlgaMaciaszek OlgaMaciaszek left a comment

Choose a reason for hiding this comment

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

Thanks, galaxy-sea. Have added some more comments. Please address.

Http2Client http2Client = (Http2Client) delegate;
HttpClient httpClient = getField(http2Client, "client");
MockingDetails httpClientDetails = mockingDetails(httpClient);
assertThat(httpClientDetails.isMock()).isTrue();
Copy link
Collaborator

Choose a reason for hiding this comment

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

It would probably be better to create a new HttpClient object (HttpClient.newHttpClient();) in the configuration and verify if it's the right type, rather than creating a mock and verifying that it's a mock.

@OlgaMaciaszek
Copy link
Collaborator

Thanks for the changes @galaxy-sea. This last one still needs to be addressed.

Copy link
Collaborator

@OlgaMaciaszek OlgaMaciaszek left a comment

Choose a reason for hiding this comment

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

LGTM.

@OlgaMaciaszek OlgaMaciaszek merged commit 8020b88 into spring-cloud:main Jun 15, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Java 11 HttpClient Support
3 participants