-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Add test for ExecutionSegment.Scale consistency #1374
Conversation
Codecov Report
@@ Coverage Diff @@
## new-schedulers #1374 +/- ##
==================================================
- Coverage 76.32% 76.30% -0.02%
==================================================
Files 161 161
Lines 12625 12625
==================================================
- Hits 9636 9634 -2
- Misses 2479 2481 +2
Partials 510 510
Continue to review full report at Codecov.
|
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.
My only nit is not a requirement
|
||
const numTests = 10 | ||
for i := 0; i < numTests; i++ { | ||
scale := rand.Int31n(99) + 2 |
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.
As I previously rebased these particular tests and used for testing the striping PR I can tell you that having values that are both smaller then the count of the segments and bigger is ... a good idea :D
I think that we can do something like:
- get the number of segments(this is the first argument to
generateRandomSequence
- generate random numbers and run test for scale being smaller, equal and bigger to the count of segments.
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.
Hhmm not sure what that would look like, but I'll think about it next time I touch these tests, thanks.
This is a test from #1339, which did a bunch of things that are not needed anymore, so this is a cut-down version of that.
See #1296