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 runner can miss catching errors if they time out in just the right way #7

Open
juliemr opened this issue Jul 15, 2014 · 1 comment

Comments

@juliemr
Copy link
Member

juliemr commented Jul 15, 2014

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.

@juliemr juliemr added the bug label Jul 15, 2014
@apoh
Copy link

apoh commented Aug 11, 2014

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants