ruby 1.8.7 (352)
test-unit (2.3.0)
watir (2.0.1)
watir-webdriver (0.3.3)
IE9/probably others

I don't know if other people have seen this, but I'm occasionally
getting stacks that look like:

C:/Users/jw/.pik/rubies/Ruby-187-p352/lib/ruby/1.8/timeout.rb:64:in
`rbuf_fill': execution expired (Timeout::Error)
        from C:/Users/jw/.pik/rubies/Ruby-187-p352/lib/ruby/1.8/net/
protocol.rb:134:in `rbuf_fill'
        from C:/Users/jw/.pik/rubies/Ruby-187-p352/lib/ruby/1.8/net/
protocol.rb:116:in `readuntil'
...
        from C:/Users/jw/.pik/rubies/Ruby-187-p352/lib/ruby/gems/1.8/
gems/selenium-webdriver-2.6.0/lib/selenium/webdriver/common/element.rb:
34:in `click'
        from C:/Users/jw/.pik/rubies/Ruby-187-p352/lib/ruby/gems/1.8/
gems/watir-webdriver-0.3.3/lib/watir-webdriver/elements/element.rb:
67:in `click'
        from ./watirutilbuttonclicks.rb:120:in `click'
...

while running my tests, and instead of just making the current test
fail, the whole test suite is stopping execution.  It seems
Timeout::Error is a SignalException and is a "pass-through" error that
Test::Unit will re-raise which will cause the whole test Suite to stop
execution.  I have added Timeout::Error to the pass-through list by
adding this line to my ClassExtensions.rb (required lastly in order to
add or override some Watir methods).

Test::Unit::ErrorHandler::NOT_PASS_THROUGH_EXCEPTIONS.push(Timeout::Error)

This seems to have fixed my issue in the most elegant way possible
(test still fails, but suite continues execution) but I couldn't find
documentation on NOT_PASS_THROUGH_EXCEPTIONS anywhere, so if this
isn't a good idea, please let me know.

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

[email protected]
http://groups.google.com/group/watir-general
[email protected]

Reply via email to