angular/jasminewd

Test runner can miss catching errors if they time out in just the right way

juliemr opened this issue · 1 comments

If an individual command is still running when the test comes out, listeners registered on it will still be called. For example:

  it('should timeout', function() {
    flow.execute(function() {
      return webdriver.promise.delayed(500).then(function() {
        return webdriver.promise.fulfilled('a');
      });
    }).then(function() {
      throw new Error('error here');
    });
  }, 460);

Jasmine will time out the test after 460 milliseconds, but the listener will still fire after 460 milliseconds. This can cause the next it block to fail, or even worse, if the error occurs before Jasmine has started the next test, the whole thing fails as an uncaught exception.

apoh commented

It seems I've problems with this issue in combination with protractor and grunt-protractor. In this combination its unable to get a clean termination of the running processes.

Are there any updates or workarounds for this bug?