-
Notifications
You must be signed in to change notification settings - Fork 4
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
Reinstanting RmqThreadCommunicator tests #124
Conversation
The release of kiwipy v0.8.0 made some breaking changes to the intended API of RmqThreadCommunicator. I'm putting back tests that check for the intended API which will be fixed in due time.
Apologies captain, thanks for jumping in. Anyway had to quickly make a |
Nae dramas, I think it'll be a quick fix. |
pytray 0.3.4 contains fix for async_ctx that was causing thread communicator tests to fail. Also modernised some async calls, getting rid of all async_generator syntax (not needed as our python minimum is 3.7)
Codecov ReportBase: 89.54% // Head: 90.20% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## develop #124 +/- ##
===========================================
+ Coverage 89.54% 90.20% +0.67%
===========================================
Files 15 15
Lines 1137 1132 -5
===========================================
+ Hits 1018 1021 +3
+ Misses 119 111 -8
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Ok. I've fixed the problem. Turned out to be an upstream bug in All fixed in pytray 0.3.4. |
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 a lot @muhrin ! Just a few minor things to cleanup and then we can merge this.
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.
Minor changes
In commit 3806a9e the requirement of the `aio-pika` dependency was updated. In adjusting the code to the changes in their API, certain methods of the `RmqThreadCommunicator` were made asynchronous. However, the whole point of the `RmqThreadCommunicator` is to shield the consumer from any async code. The changes in the interface and the tests are reverted and the implementation of `RmqThreadCommunicator` is updated to match the inter- face of the newer `aio-pika` version. Doing so actually revealed a bug in `pytray` causing the unit test `test_queue_get_next` to hang forever while waiting for the future to be set. The `pytray.LoopScheduler` was propagating a future the wrong way around: instead of the result from a thread future being passed to the asyncio future, it was doing the opposite causing the future to never be resolved. The bug is fixed in `pytray==0.3.4`.
The release of kiwipy v0.8.0 made some breaking changes to the intended API of RmqThreadCommunicator. I'm putting back tests that check for the intended API which will be fixed in due time.