-
Notifications
You must be signed in to change notification settings - Fork 2k
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
mgmt, support HttpPipelinePosition in pipeline creation #25189
mgmt, support HttpPipelinePosition in pipeline creation #25189
Conversation
import com.azure.core.http.policy.RequestIdPolicy; | ||
import com.azure.core.http.policy.RetryPolicy; | ||
import com.azure.core.http.HttpPipelinePosition; | ||
import com.azure.core.http.policy.*; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
configure your IDE to avoid *
@@ -69,15 +63,28 @@ public static HttpPipeline buildHttpPipeline( | |||
policies.add(new AddHeadersFromContextPolicy()); | |||
policies.add(new RequestIdPolicy()); | |||
policies.add(new ReturnRequestIdHeaderPolicy(ReturnRequestIdHeaderPolicy.Option.COPY_CLIENT_REQUEST_ID)); | |||
if(additionalPolicies != null && !additionalPolicies.isEmpty()){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you probably going to fail style check.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
easier to use CoreUtils.isNullOrEmpty()
@@ -0,0 +1,177 @@ | |||
package com.azure.resourcemanager.resources; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
copyright
You may want to check with Haoling about coding styles. see https://github.com/Azure/azure-sdk-for-java/wiki/Building for local build. (Java other than 11 or 17 might have problem on javadoc build). |
@@ -69,15 +63,28 @@ public static HttpPipeline buildHttpPipeline( | |||
policies.add(new AddHeadersFromContextPolicy()); | |||
policies.add(new RequestIdPolicy()); | |||
policies.add(new ReturnRequestIdHeaderPolicy(ReturnRequestIdHeaderPolicy.Option.COPY_CLIENT_REQUEST_ID)); | |||
if(additionalPolicies != null && !additionalPolicies.isEmpty()){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
easier to use CoreUtils.isNullOrEmpty()
*/ | ||
public class HttpPipelineProviderTest { | ||
|
||
static class MockTokenCredential implements TokenCredential { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tests is nice!
you can use mockito e.g. #24849
2. mockito use in unit test
[Fleet] API 2023-06-15-preview (Azure#25027) * Adds base for updating Microsoft.ContainerService/fleet from version preview/2023-03-15-preview to version 2023-06-15-preview * Updates readme * Updates API version in new specs and examples * [Fleet][Dev] API 0615 changes (Azure#25020) * Adds base for updating Microsoft.ContainerService/fleet from version preview/2023-03-15-preview to version 2023-06-15-preview * Updates readme * Updates API version in new specs and examples * sync with ADO repo * exclude unneeded file changes * revert tsp config * revert helpers.tsp * remove package files * remove package files * add known word containerd * format * remove .npmrc * revert custom word * revert package-lock.json * re-generate json * add example * add example * fix read-only fields * fix read-only fields * re-generate json with latest compiler * add custom word back * re-generate json * restore config * add examples * add examples * add examples * add examples * add examples * add examples * prettier * fix examples * git ignore * review commoents * fix examples * make node image selection optional * fix warnings * fix warnings * fix warnings * fix docs * revert package changes * compile * fix tspconfig (Azure#25031) * [Fleet][readmes] Dev aks fleet 2023 06 15 preview readmes (Azure#25033) * update readmes * fix readme mistake * fix operationid warnings (Azure#25109) * tsp format (Azure#25111) * Fix aks fleet 2023 06 15 preview patchasync from 0615 (Azure#25131) * do the breaking change only from 0615 * fix patch * compile to get examples * remove sample * fix member upate operation (Azure#25134) * revert extension removal (Azure#25189) * generate with type spec v0.47.0 (Azure#25484) --------- Co-authored-by: Stéphane Erbrech <stephane.erbrech@gmail.com>
fix #25060