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

#1386 fix nextInt and nextLong with extreme boundaries #1388

Merged
merged 1 commit into from
Oct 21, 2024

Conversation

asolntsev
Copy link
Collaborator

e.g.

  • randomService.nextInt(Integer.MIN_VALUE, Integer.MAX_VALUE)
  • randomService.nextLong(Long.MIN_VALUE, Long.MAX_VALUE)

@asolntsev asolntsev linked an issue Oct 17, 2024 that may be closed by this pull request
@asolntsev asolntsev self-assigned this Oct 17, 2024
Copy link

codecov bot commented Oct 21, 2024

Codecov Report

Attention: Patch coverage is 86.66667% with 2 lines in your changes missing coverage. Please review.

Project coverage is 92.26%. Comparing base (c94d690) to head (b60ed48).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...main/java/net/datafaker/service/RandomService.java 84.61% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #1388      +/-   ##
============================================
- Coverage     92.32%   92.26%   -0.06%     
- Complexity     3152     3154       +2     
============================================
  Files           319      319              
  Lines          6146     6152       +6     
  Branches        592      593       +1     
============================================
+ Hits           5674     5676       +2     
- Misses          331      335       +4     
  Partials        141      141              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@asolntsev asolntsev requested a review from kingthorin October 21, 2024 09:41
@kingthorin
Copy link
Collaborator

Drop the unrelated workflow change?

e.g.
* `randomService.nextInt(Integer.MIN_VALUE, Integer.MAX_VALUE)`
* `randomService.nextLong(Long.MIN_VALUE, Long.MAX_VALUE)`

P.S. document the legacy behaviour of `nextLong` method (when min == max)
@kingthorin
Copy link
Collaborator

To be clear I do think that's probably a handy change if you want to submit it separately.

(I'll leave that approval/merge up to bodiam but for my two cents it's good)

* @param min the maximum value
* @param max the minimal value
* @param min the minimum value
* @param max the maximum value
Copy link
Collaborator

Choose a reason for hiding this comment

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

Ha good catch, one of obviously didn't notice the mismatch.

@kingthorin kingthorin merged commit 17084c5 into main Oct 21, 2024
10 of 12 checks passed
@kingthorin kingthorin deleted the fix/1386-next-int branch October 21, 2024 10:55
@asolntsev
Copy link
Collaborator Author

that's probably a handy change if you want to submit it separately

I am not sure if it's useful. I wanted looked for a github action that would generate a readable test report.
Because usually it's hard to find which test failed (when a build fails in Github actions).
But this specific action didn't help a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🐞 Random service has a bug with boundaring values
2 participants