e-conomic/phantom-render-stream — pull request #48 by markstos (2014-07-29 01:14:15+00:00)
Title: Fix hardcoded timeout value affecting renders taking longer than 10 seconds, but less then `timeout`.

There are additional commits here as this work built on other work:

* I also ended up fixing a bug that I found in-process which is that `expects` is documented as something that can be passed to `phantom` as well as `render`, but that wasn't actually working. I added new test coverage to illustrate that.
* That detour in turn built on some other clean-up work I did, including addressing an issue where the tmp file names weren't been generated consistently. In one place they included in the PID, but not in the other, now they consistently include the PID.
* The changes above built on the work to improve the handling options in general, so those commits are included.
* New test coverage for the longer-than-10-seconds render issue is also included.

The fix includes using the same `timeout` option for the render timeout as well as the general phantom timeout. This is simpler than having two timeout values and might well be sufficient, so it's try it out.

See the commit messages for more detail. I tried to make smaller commits with clear messages to you could see the detail of what was going on. I do see some typos in my commit messages where I meant "simplify" but typed "simply" instead.