Update go test#1187
Draft
gammazero wants to merge 3 commits into
Draft
Conversation
Replace all use of `math/rand` with `math/rand/v2`
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Codecov Report❌ Patch coverage is @@ Coverage Diff @@
## main #1187 +/- ##
==========================================
- Coverage 63.87% 63.82% -0.06%
==========================================
Files 269 269
Lines 27078 27082 +4
==========================================
- Hits 17297 17286 -11
- Misses 8073 8084 +11
- Partials 1708 1712 +4
... and 11 files with indirect coverage changes 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🧪 Tests use new
go-testandmath/rand/v2The new
go-testis upgraded to usemath/rand/v2in all of its packages. The/go-test/randompackage now allows reuse of the random number generator for more efficiently generating sets of random values.Additionally, the
/go-test/randompackage removes support for a global seed for the random number generator. This led to the possibility of multiple tests setting the global seed to generate deterministic values, and breaking other tests by causing the generator to generate unexpected values. This breakage could be intermittent and difficult to debug, depending on the how/which tests ran at the same time.Since the underlying pseudo-random number generator was changed in the go-test module, the data generated for a given seed also changed. This required updating tests that relied on seeding the generator and getting expected values.
go-test/randomAPI/math/rand' to/math/rand/v2`[32]byteand notuint64