-
Notifications
You must be signed in to change notification settings - Fork 25
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
Added async delay and checked delay #104
Conversation
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.
Thanks! I left two comments.
@dbrgn Fixed raised issues. At the same time, the existing implementations weren't actually mocks, rather stubs. I added a new delay instance called CheckedDelay which is a proper mock with transactions. |
Hi @Artur-Romaniuk, thanks for the update! I improved the module documentation and pushed a commit directly to your fork, I hope that's OK. I'll also rebase the branch against |
I'm really confused why the doc tests fail in CI... They work without any issues locally 😕 I'll try to investigate another day (but any pointers would be welcome). By the way, @Artur-Romaniuk, I noticed that you used a different e-mail for the first commit compared to the others. If this was a mistake, now you could still fix it using git rebase 🙂 |
Happy to see your changes. Will look at it tomorrow. |
- simplified impl to use only Ns delays - now default delay is accepting blocking and async
Love that you've added a checked delay. This was something I needed so I came up with my own one of those (not as good ofc). Not really that relevant to this PR but something minor and relevant enough that I figure I should bring it up here: Looking forward to this being merged. Let me know if there is any way in which I can help. |
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.
Thanks for the updates, @Artur-Romaniuk! I think the simplification with the nanosecond-only delay has improved the readability a lot!
I left some more comments. I hope that was the last round of review.
(Note to self: When merging, we should use squash mode.)
I think you are right, thanks for bringing this up! @Artur-Romaniuk could you test if everything keeps working if you remove those potentially unneeded overrides? |
I think there is a valid reason for doing it this way. In that case, mock would have to add N expectations of
using defaults, this would equate to
I believe the current impl is the easiest one and there is no benefit in using default impl. |
You are right, thanks for your explanation! |
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 think this is now good to merge! Thanks @Artur-Romaniuk for your patience!
Delay lacked async implementation.
Needed it for my test so I added it.