Question

Keeping in mind, I am completely new to Frank and ruby..

Whenever we run Frank and a test fails, Frank lets us know the test fails but the inbuilt Frank server just seems to sit there and timeout for about 60 seconds before moving on to the next test. Has anyone come across this / have a fix, especially if it can be done without changing any of the gems that Frank uses?

Was it helpful?

Solution

OK, so I this isn't the 100% answer I was looking for but:

The timeout is the NET:HTTP(ReadTimeout), which defaults to 60 seconds if not specified when creating a new HTTP object. This HTTP object is created in the gateway.rb in Cucumber, so (I don't remember the exact method, but it's wherever HTTP.new is being executed) simply add a new line http.read_timeout = <yourvalueinseconds>

This will change the timeout to whatever you specify. I'm still looking for a solution that doesn't involve modifying any of the gems that Frank uses so I can push this fix out via SCM, but after a lot of searching and trawling through frank, and a quick chat with the guy who started Frank on twitter, this might not be possible.

EDIT:

Turns out changing the read_timeout fixed the problem, but was not actually the source of the problem. It was stemming from frankly_screenshot() after a test failed. Possibly the app crashed after a test failed, and frankly_screenshot() had nothing to grab, but kept on trying until the timeout

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top