-
Notifications
You must be signed in to change notification settings - Fork 33
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
Issue #127 - Consistent Hash binding key must be integer #128
base: master
Are you sure you want to change the base?
Conversation
|
||
|
||
@Test | ||
void binding_with_non_integer_key_throws_exception() { |
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.
This test can be more expressive with a parameterized test
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.
I miss read the message on my phone so I've also parameterised the distribution test to use a 25 tests with a random number of receivers and a random number of messages.
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.
I am sorry for the extra work, but to be honest I found the distribution test way less readable.
I am okay with parameterizing it, but I think a few cases with hard coded values will be easier to reason about.
I am also okay with reverting it to the first version 😄
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.
No problem. I've reverted the parameterised version of the dispatch_respects_queue_weight and kept the parameterised version of the exception test.
Codecov Report
@@ Coverage Diff @@
## master #128 +/- ##
============================================
- Coverage 94.20% 93.84% -0.37%
+ Complexity 455 452 -3
============================================
Files 38 38
Lines 1070 1072 +2
Branches 49 49
============================================
- Hits 1008 1006 -2
- Misses 45 48 +3
- Partials 17 18 +1
Continue to review full report at Codecov.
|
…ge with a non integer binding key
aaf8dde
to
a763be2
Compare
See #127 - Now throws an illegal argument exception on trying to bind rather than using the Hashcode of a non integer.