ferrum
ferrum copied to clipboard
Build fails on JRuby
Sometimes it passes without issues like here https://travis-ci.org/route/ferrum/builds/587362556 but more often it fails sporadically at any given time https://travis-ci.org/route/ferrum/jobs/585764841 with timeout.
We use concurrent-ruby primitives here like Hash, Ivar, Mvar and some Ruby threads for websocket/driver nothing unusual but I cannot spot the issue...
/cc @headius
Hello, thanks for letting me know about this issue!
The failure is a bit confusing... the spec that fails is "Ferrum::Browser lists the open windows" but it appears that the failure happens downstream from a browser.reset call. The only such call I can see in browser_spec.rb is in a different spec, "Ferrum::Browser clears local storage after reset".
I think the failure is happening in the "before" section here: https://github.com/route/ferrum/blob/master/spec/spec_helper.rb#L55-L59
In that code, I notice a timeout of 5 seconds. If this timeout involves starting a subprocess JRuby instance, there's a chance that slower environments may not start up fast enough. If that's the problem here, then bumping to a larger timeout like 10 seconds should make this more reliable.
Thank you Charles for taking a look I'll try to investigate it further
Related to https://github.com/rubycdp/ferrum/issues/75