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

Make event loop code testable in its module #2423

Closed
mstoykov opened this issue Mar 9, 2022 · 0 comments · Fixed by #2399
Closed

Make event loop code testable in its module #2423

mstoykov opened this issue Mar 9, 2022 · 0 comments · Fixed by #2399
Assignees
Milestone

Comments

@mstoykov
Copy link
Contributor

mstoykov commented Mar 9, 2022

Post #2228 we now have an event loop and that is great but nothing is using it. One of the problems that is making this harder is the fact currently the only actual way to test what happens is to run an integration test. This though is quite cumbersome and in practice requires the test to be outside the module implementing the code as otherwise there is every chance for an import cycle. This is even worse for extensions IMO.

Proposed solution:

Well the predominant thing missing is access to the event loop, so just moving it to a separate module and exporting fixes most of this IMO.

A current WIP PR can be seen at #2399

Other ideas:

We can only do the changes to modulestest and let implementors mock the event loop which might be a better first step. But I kind of feel having to reimplement the event loop in parts isn't a great idea ;)

@mstoykov mstoykov added this to the v0.38.0 milestone Mar 9, 2022
@mstoykov mstoykov linked a pull request Mar 9, 2022 that will close this issue
@mstoykov mstoykov self-assigned this Mar 9, 2022
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 a pull request may close this issue.

1 participant