Skip to content

Conversation

@omarlopesino
Copy link

@omarlopesino omarlopesino commented May 18, 2017

Hi.

This pull request include this features to the '@given I wait for AJAX' step:

  1. Allow specify time to wait, in case requests are longer than 5 seconds, with this sintax:
    Given I wait for AJAX to finish at least "10" seconds
  2. Throw exception when AJAX petition didn't finish; in some case it breaks the test in another part. There is some reason to don't throw an exception in this step, maybe it's not completely trustworthy?

Can you review this changes and merge? Thanks!

@pfrenssen
Copy link
Collaborator

I agree that this limit is too low. Waiting for a specific number of seconds is never reliable, a test machine may be experiencing slowdowns on some occasions, causing random test failures.

It would be better if this isn't set by passing in an argument, but by a configuration value in behat.yml. Then if you know you are going to run a test suite on slow infrastructure you can increase the timeouts for the entire test run, or even pass in the options on the command line.

Are there any other places where we are using a hardcoded timeout?

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants