# Weird behaviour in test runner after update to 1.10 + 0.1.15 combo

**URL:** <https://discuss.emberjs.com/t/weird-behaviour-in-test-runner-after-update-to-1-10-0-1-15-combo/7318>\
**Category:** Uncategorized\
**Created:** [February 14, 2015, 1:52am UTC](https://discuss.emberjs.com/t/weird-behaviour-in-test-runner-after-update-to-1-10-0-1-15-combo/7318 "2015-02-14T01:52:29Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![jcope2013](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/jcope2013/32/9878_2.png) [@jcope2013](https://discuss.emberjs.com/u/jcope2013)\
**Post date:** [March 1, 2015, 8:53pm UTC](https://discuss.emberjs.com/t/weird-behaviour-in-test-runner-after-update-to-1-10-0-1-15-combo/7318/9 "2015-03-01T20:53:37Z")

</div>

seems like you may have lose Ember.run.later laying around or are not wrapping your ajax call’s in an ember.run compliant way, that is a typical issue with andThen’s not running, the place to debug would be in the wait function [https://github.com/emberjs/ember.js/blob/master/packages/ember-testing/lib/helpers.js#L201](https://github.com/emberjs/ember.js/blob/master/packages/ember-testing/lib/helpers.js#L201)

other things mentioned where andThen’s won’t run properly, the Misago library also might be the underlying problem in some way

> <https://github.com/emberjs/ember.js/issues/3008#issuecomment-73246784>
>
> the wait method in ember-testing is checking for scheduledTimers (https://github….com/emberjs/ember.js/blob/master/packages/ember-testing/lib/helpers.js#L102) and returns if any are active.
> 
> We have several scheduled timers running in the app via run.later 
> 
> When a test action (e.g. click) gets beyond the login in our application, the timers start and all subsequent thennables are blocked.
> 
> I'm happy to construct a fix (or failing test case) but need to understand what the motivation for checking hasTimers is.  
> 
> \<!---
> @huboard:{"order":170.1875,"custom\_state":""}
> \--\>

> [@Proper way to handler timers w/ Ember Testing](http://discuss.emberjs.com/t/proper-way-to-handler-timers-w-ember-testing/4693/9):
>
> @YoranBrondsema @slindberg I decided that it was actually a good idea for me to use Ember.run.later because it would potentially allow me to avoid some race conditions. I.E. if the setTime fired after the test suite had tour down, etc. So forcing the app to wait until the time has executed was a healthy thing [for me]. My real complaint was simply the time it took. So I ended up creating a static config object that was registered with the App.register and injected it into my views and controll…

> [@Testing and scheduled timers in run loop](http://discuss.emberjs.com/t/testing-and-scheduled-timers-in-run-loop/1332):
>
> While implementing integration testing using the ember-testing package, I noticed that the “then” portion of “visist(”/“).then(…)” is never being called. After digging in to it some, this is because Ember.run.hasScheduledTimers() never hits zero ([https://github.com/emberjs/ember.js/blob/master/packages/ember-testing/lib/helpers.js#L65](https://github.com/emberjs/ember.js/blob/master/packages/ember-testing/lib/helpers.js#L65)). Navigating through our app, I notice that we’ll have anywhere from a few to thousands of scheduled timers (according to this function). Should this be avoided? …

---

_[View the full topic](https://discuss.emberjs.com/t/weird-behaviour-in-test-runner-after-update-to-1-10-0-1-15-combo/7318)._
