Skip to content

Commit

Permalink
[BUGFIX] Tests may fail due to PhantomJs not ready (#283)
Browse files Browse the repository at this point in the history
* [BUGFIX] Tests may fail due to PhantomJs not ready

- PB: Under some systems, Behat tests fails due to the fact the
PhantomJS server is not ready to handle connections.
- FIX: ensure server is running before continuing.
- NOTE: currently use curl to test, if curl is not available, it doesn't
wait

* [FEATURE]Exit after 10s if PhantomJS doesn't start

Note: curl test has been replaced by phing internal http request.

* [BUGFIX] Fix checked port

4444 instead of 8888 set in behat.server-url
  • Loading branch information
mickaelperrin authored and grasmash committed Aug 15, 2016
1 parent 588e9b9 commit cd8d204
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions phing/tasks/tests.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@
passthru="true"
spawn="true"
checkreturn="true" />
<echo message="Waiting 10 seconds for PhantomJS (http://127.0.0.1:4444) to become available."/>
<waitfor maxwait="10" maxwaitunit="second" checkevery="1" checkeveryunit="second">
<http url="http://127.0.0.1:4444"/>
</waitfor>
</then>
</if>
</target>
Expand Down

0 comments on commit cd8d204

Please sign in to comment.