Skip to content

Commit

Permalink
fix(node,middleware): remove duplicate retry policy
Browse files Browse the repository at this point in the history
  • Loading branch information
davidyuk committed Apr 3, 2024
1 parent 450296e commit f6470a2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/Middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,5 +143,7 @@ export default class Middleware
});
this.pipeline.removePolicy({ name: userAgentPolicyName });
this.pipeline.removePolicy({ name: setClientRequestIdPolicyName });
// TODO: use instead our retry policy
this.pipeline.removePolicy({ name: 'defaultRetryPolicy' });
}
}
2 changes: 2 additions & 0 deletions src/Node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,8 @@ export default class Node extends (NodeTransformed as unknown as NodeTransformed
});
this.pipeline.removePolicy({ name: userAgentPolicyName });
this.pipeline.removePolicy({ name: setClientRequestIdPolicyName });
// TODO: use instead our retry policy
this.pipeline.removePolicy({ name: 'defaultRetryPolicy' });
this.intAsString = true;
}

Expand Down
2 changes: 0 additions & 2 deletions test/integration/AeSdkMethods.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ describe('AeSdkMethods', () => {
{ policy: { name: 'decompressResponsePolicy' }, options: {} },
{ policy: { name: 'formDataPolicy' }, options: { beforePolicies: ['multipartPolicy'] } },
{ policy: { name: 'multipartPolicy' }, options: { afterPhase: 'Deserialize' } },
{ policy: { name: 'defaultRetryPolicy' }, options: { phase: 'Retry' } },
{ policy: { name: 'tracingPolicy' }, options: { afterPhase: 'Retry' } },
{ policy: { name: 'redirectPolicy' }, options: { afterPhase: 'Retry' } },
{ policy: { name: 'logPolicy' }, options: { afterPhase: 'Sign' } },
Expand All @@ -80,7 +79,6 @@ describe('AeSdkMethods', () => {
{ name: 'error-formatter' },
{ name: 'deserializationPolicy' },
{ name: 'multipartPolicy' },
{ name: 'defaultRetryPolicy' },
{ name: 'tracingPolicy' },
{ name: 'redirectPolicy' },
{ name: 'logPolicy' },
Expand Down

0 comments on commit f6470a2

Please sign in to comment.