-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Made changes in retry_test.go added a function named newRetryHTTP to … #2484
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
base: development
Are you sure you want to change the base?
Conversation
Release/v1.44.2
Release/v1.45.0
Release/v1.46.0
Release/v1.46.1
Release/v1.46.2
Release/v1.46.3
…reduce redundancy
|
@Umang01-hash kindly review. |
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.
Pull Request Overview
This PR refactors test code to reduce duplication by extracting common retry HTTP setup logic into a reusable helper function.
- Introduced a
newRetryHTTP()helper function to encapsulate the creation of retry HTTP instances - Updated 9 test functions to use the new helper instead of duplicating setup code
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
pkg/gofr/service/retry_test.go
Outdated
| retryHTTP := retryConfig.AddOption(mockHTTP) | ||
| retryHTTP := newRetryHTTP() | ||
|
|
||
|
|
Copilot
AI
Nov 6, 2025
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.
[nitpick] There are two consecutive blank lines after the helper function call. This should be reduced to a single blank line for consistency with coding style.
pkg/gofr/service/retry_test.go
Outdated
| retryHTTP := newRetryHTTP() | ||
|
|
||
|
|
Copilot
AI
Nov 6, 2025
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.
[nitpick] There are two consecutive blank lines after the helper function call. This should be reduced to a single blank line for consistency with coding style.
pkg/gofr/service/retry_test.go
Outdated
| retryHTTP := newRetryHTTP() | ||
|
|
||
|
|
Copilot
AI
Nov 6, 2025
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.
[nitpick] There are two consecutive blank lines after the helper function call. This should be reduced to a single blank line for consistency with coding style.
pkg/gofr/service/retry_test.go
Outdated
| retryHTTP := newRetryHTTP() | ||
|
|
||
|
|
Copilot
AI
Nov 6, 2025
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.
[nitpick] There are two consecutive blank lines after the helper function call. This should be reduced to a single blank line for consistency with coding style.
pkg/gofr/service/retry_test.go
Outdated
| retryHTTP := newRetryHTTP() | ||
|
|
||
|
|
Copilot
AI
Nov 6, 2025
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.
[nitpick] There are two consecutive blank lines after the helper function call. This should be reduced to a single blank line for consistency with coding style.
pkg/gofr/service/retry_test.go
Outdated
| retryHTTP := retryConfig.AddOption(mockHTTP) | ||
| retryHTTP := newRetryHTTP() | ||
|
|
||
|
|
Copilot
AI
Nov 6, 2025
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.
[nitpick] There are two consecutive blank lines after the helper function call. This should be reduced to a single blank line for consistency with coding style.
pkg/gofr/service/retry_test.go
Outdated
| retryHTTP := newRetryHTTP() | ||
|
|
||
|
|
Copilot
AI
Nov 6, 2025
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.
[nitpick] There are two consecutive blank lines after the helper function call. This should be reduced to a single blank line for consistency with coding style.
pkg/gofr/service/retry_test.go
Outdated
| retryHTTP := retryConfig.AddOption(mockHTTP) | ||
| retryHTTP := newRetryHTTP() | ||
|
|
||
|
|
Copilot
AI
Nov 6, 2025
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.
[nitpick] There are two consecutive blank lines after the helper function call. This should be reduced to a single blank line for consistency with coding style.
|
@aaryyya Thanks for your contribution to GoFr! Your PR is currently failing the Code Quality test in the workflow with the below message.
|

No description provided.