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 isolation validation should include canceling active test waiters in ember-test-watiers #488

Open
scalvert opened this issue May 12, 2019 · 3 comments

Comments

@scalvert
Copy link
Contributor

scalvert commented May 12, 2019

The ember-test-waiters library will soon include an API to cancel all pending waiters. This is a similar concept to where we cancel timers if test isolation validation is triggered:

.finally(() => {
// canceling timers here isn't perfect, but is as good as we can do
// to attempt to prevent future tests from failing due to this test's
// leakage
run.cancelTimers();
return doFinish();

This will help ensure that we don't leak state from one test to another, potentially 'wedging' the test waiters and creating an inconsistent state.

@rwjblue
Copy link
Member

rwjblue commented May 13, 2019

I'm a bit on the fence here, while I agree that it might seem nice to have I do not think that we can actually cancel the async operation that the waiters are paused on. This means that while the waiters will not pause tests any more, you actually are in a broken state. Silently swallowing that seems extremely bad...

@scalvert
Copy link
Contributor Author

Had a good chat with @rwjblue offline. We agreed that adding this API will likely result in leaks actually occurring, defeating the point of the waiters.

We discussed evaluating settled when a test starts, and if we're not in a settled state, fail hard then so we don't incorrectly signal test failures on successive tests.

@rwjblue
Copy link
Member

rwjblue commented May 17, 2019

@scalvert - Should we close then?

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

No branches or pull requests

2 participants