Open
Description
http://ember-concurrency.com/docs/testing-debugging describes the problem quite well. These days we have access to rawTimeout()
though, which can often solve the issue of the infinitely waiting test waiters.
Bad
pollForChanges: task(function * () {
while (true) {
yield pollServerForChanges();
yield timeout(5000);
}
})
Good
pollForChanges: task(function * () {
while (true) {
yield pollServerForChanges();
yield rawTimeout(5000);
}
})
pollForChanges: task(function * () {
while (!Ember.testing) {
yield pollServerForChanges();
yield timeout(5000);
}
})