-
Notifications
You must be signed in to change notification settings - Fork 440
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
docs aren't clear server needs to be shutdown #226
Comments
I'll add some context to this. Chasing some memory leaks, we saw that pretender instances were leaking all over the place, once per test. There is (was, actually) a memory leak in pretender itself, but also seems that unless you explicitly shutdown the server, that also keeps some references, but once @trek cuts a new release we'll see if this is really necessary. I'd say that after the fix in pretender the the only leaked variable will be the global |
@stefanpenner do you have any ideas how to fix this? Is there a way to hook into the app destroy event to clean up the server? |
Also, for those running into this, you need to call |
i think you want to hook into the test runner after hooks |
I wonder if there's a way to do that in a generic way that would work for people using Qunit, Mocha, etc. |
I just wrote a PR to ember-cli that would make this a very simple fix. We'll see how it goes. |
Ember-CLI 1.13.9 and beyond will have a destroy-app helper that we can shutdown the server in. This patch automatically inserts this behavior, or shows a message if the user doesn't have a destroy-app helper explaining how to fix the problem. Fixes miragejs#226.
Ember-CLI 1.13.9 and beyond will have a destroy-app helper that we can shutdown the server in. This patch automatically inserts this behavior, or shows a message if the user doesn't have a destroy-app helper explaining how to fix the problem. Fixes miragejs#226.
Ember-CLI 1.13.9 and beyond will have a destroy-app helper that we can shutdown the server in. This patch automatically inserts this behavior, or shows a message if the user doesn't have a destroy-app helper explaining how to fix the problem. Fixes miragejs#226.
Either the docs need to be adjusted, or a mechanism of automatic shutdown (after
run(app, 'destroy')
) is neededcc @cibernox
The text was updated successfully, but these errors were encountered: