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

test: prevent test event handlers from interfering with each other #66

Merged
merged 4 commits into from
Feb 23, 2021

Conversation

keturn
Copy link
Contributor

@keturn keturn commented Feb 21, 2021

This doesn't fix all the tests, but it does help.

@keturn
Copy link
Contributor Author

keturn commented Feb 21, 2021

I admit the try-blocks are ugly here, as much as is crammed in to that expression creating the resource. I bet there's some way we could do some kind of annotation thing that would inject an event handler and unregister it at the end of the test instead of the try-with-resources blocks. Sounds like something @DarkWeird would know?

@DarkWeird
Copy link
Contributor

You can do it via creating ComponentSystem with registering and unregistering at EventSystem.

@skaldarnar skaldarnar merged commit fdbd852 into develop Feb 23, 2021
@skaldarnar skaldarnar deleted the test/regen-event-handlers branch February 23, 2021 17:32
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.

4 participants