Selenium w/ Ruby timing out when trying http operations

Sometimes, not always, when trying to do Selenium driver operations in Ruby, mysterious timeouts will be thrown with the stacktrace showing '/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/protocol.rb:146:in `rescue in rbuf_fill'' as the error.

After looking into this, it is a bug in the ruby http module, and the most common answer to this problem is to change the http @read_timeout to 500 or so (from 60). However, since I am running a rather large test suite, this can cause tests to take up to 10 times longer, and sometimes they even still timeout. Is there a better solution to this bug than changing the timeout threshold?

链接地址: http://www.djcxy.com/p/38740.html

上一篇: 如何解决Rails模型命名空间冲突

下一篇: 尝试http操作时,Selenium w / Ruby会超时