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

optional arg in initialize to avoid creating network io #28

Merged
merged 3 commits into from
Aug 11, 2022

Conversation

kafonek
Copy link
Contributor

@kafonek kafonek commented Aug 11, 2022

Little flag to make testing easier. await mgr.initialize(enable_polling=False) will start the inbound and outbound queue workers, but not the poll worker. That way your backend won't start making IO connections, and you can test registered callbacks that use .send by asserting ._publish was called while triggering the callbacks using .schedule_for_delivery.

@kafonek
Copy link
Contributor Author

kafonek commented Aug 11, 2022

Current dependencies on/for this PR:

This comment was auto-generated by Graphite.

@kafonek kafonek marked this pull request as ready for review August 11, 2022 13:44
@kafonek kafonek requested a review from a team August 11, 2022 13:45
@kafonek kafonek force-pushed the mrk/initialize_enable_polling_flag branch from dced578 to 7c9ac3e Compare August 11, 2022 13:47
@kafonek kafonek force-pushed the mrk/initialize_enable_polling_flag branch from 7c9ac3e to 69bd20f Compare August 11, 2022 13:50
Base automatically changed from mrk/websocket_send_sync to main August 11, 2022 13:56
@kafonek kafonek force-pushed the mrk/initialize_enable_polling_flag branch from 722b217 to 53d2eba Compare August 11, 2022 13:57
@codecov-commenter
Copy link

codecov-commenter commented Aug 11, 2022

Codecov Report

Merging #28 (53d2eba) into main (4164ef7) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main      #28   +/-   ##
=======================================
  Coverage   95.46%   95.47%           
=======================================
  Files           8        8           
  Lines         463      464    +1     
=======================================
+ Hits          442      443    +1     
  Misses         21       21           
Impacted Files Coverage Δ
sending/base.py 94.49% <100.00%> (+0.02%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4164ef7...53d2eba. Read the comment docs.

@kafonek kafonek merged commit e9d2b3f into main Aug 11, 2022
@kafonek kafonek deleted the mrk/initialize_enable_polling_flag branch August 11, 2022 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants