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

Fix/replace incorrent "racePair derives race" law #142

Merged
merged 1 commit into from
Mar 8, 2018

Conversation

alexandru
Copy link
Member

Unfortunately I introduced an incorrect law for race.

The problem in cats-effect's test is that the IOs aren't non-deterministic enough and we can't fix it unless we introduce a Timer in Arbitrary[IO].

This problem was caught by Monix's tests for Task, because Arbitrary[Task] does generate tasks with arbitrary time delays.

So this law is incorrect because it expects a deterministic result and the whole point of race is precisely its non-determinism.

@alexandru alexandru added this to the 0.10 milestone Mar 8, 2018
@alexandru alexandru self-assigned this Mar 8, 2018
@codecov-io
Copy link

Codecov Report

Merging #142 into master will decrease coverage by 0.13%.
The diff coverage is 83.33%.

@@            Coverage Diff             @@
##           master     #142      +/-   ##
==========================================
- Coverage   90.11%   89.97%   -0.14%     
==========================================
  Files          47       47              
  Lines         971      978       +7     
  Branches       82       82              
==========================================
+ Hits          875      880       +5     
- Misses         96       98       +2

Copy link
Member

@LukaJCB LukaJCB left a comment

Choose a reason for hiding this comment

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

LGTM! :)

@alexandru alexandru merged commit 4e98208 into typelevel:master Mar 8, 2018
@alexandru
Copy link
Member Author

alexandru commented Mar 8, 2018

Thanks @LukaJCB for the review, merged as I'd like another hash release.

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

Successfully merging this pull request may close these issues.

3 participants