aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_timeout.rb
Commit message (Collapse)AuthorAgeFilesLines
* Add frozen_string_literal: false for all filesnaruse2015-12-161-0/+1
| | | | | | When you change this to true, you may need to add more tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_timeout.rb: exact messagesnobu2015-11-031-2/+2
| | | | | | | * test/test_timeout.rb (test_rescue_exit, test_custom_exception): assert with exact messages. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52433 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* use Timeout.timeoutnobu2015-07-131-5/+5
| | | | | | | * time: Object#timeout has been deprecated a long time ago, use Timeout.timeout. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51225 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_timeout.rb: add an assertionnobu2015-07-101-0/+5
| | | | | | | * test/test_timeout.rb (test_custom_exception): assert that the given exception will raise on timeout. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51214 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* timeout.rb: removed and use Timeout::Errornobu2015-07-101-3/+20
| | | | | | | | * lib/timeout.rb (ExitException): removed internal exception class and use Timeout::Error instead, as using throw/catch to isolate each timeouts now. [ruby-dev:49179] [Bug #11344] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51213 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_thread.rb: move thread switch testnobu2014-05-281-8/+2
| | | | | | | | | | * test/ruby/test_thread.rb (test_switch_while_busy_loop): move from test/test_timeout.rb. [Bug #1402] * test/test_timeout.rb (test_timeout): no longer related to [Bug #1402]. [Bug #8523] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46196 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/test_timeout.rb (test_timeout): inverted test condition.hsbt2014-05-271-4/+4
| | | | | | [Bug #8523] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46159 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/timeout.rb: fallback to Timeout::Errornobu2014-01-081-0/+11
| | | | | | | | | | | * lib/timeout.rb (Timeout::ExitException.catch): pass arguments for new instance. * lib/timeout.rb (Timeout::ExitException#exception): fallback to Timeout::Error if couldn't throw. [ruby-dev:47872] [Bug #9380] * lib/timeout.rb (Timeout#timeout): initialize ExitException with message for the fallback case. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44523 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* timeout.rb: fix for ExitExceptionnobu2014-01-071-0/+8
| | | | | | | | | * lib/timeout.rb (Timeout#timeout): should not rescue ordinarily raised ExitException, which should not be thrown. * lib/timeout.rb (Timeout::ExitException.catch): set @thread only if it ought to be caught. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44518 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* timeout.rb: defer creating custom exceptionnobu2014-01-071-0/+10
| | | | | | | | * lib/timeout.rb (Timeout#timeout): when a custom exception is given, no instance is needed to be caught, so defer creating new instance until it is raised. [ruby-core:59511] [Bug #9354] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44517 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_timeout.rb: shorten waiting timesnobu2014-01-071-8/+8
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44516 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* timeout.rb: raise given exceptionnobu2013-08-271-1/+15
| | | | | | | * lib/timeout.rb (Timeout#timeout): skip rescue clause only when no exception class is given. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42710 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* timeout.rb: skip rescuenobu2013-08-261-0/+14
| | | | | | | * lib/timeout.rb (Timeout#timeout): should not be caught by rescue clause. [Bug #8730] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Revert r38216 and r38221. Release manager mark this feature as "next minor".kosaki2012-12-071-63/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38260 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* timeout.rb: replace deferred exception after async_interrupt_timingnobu2012-12-071-1/+2
| | | | | | | | * lib/timeout.rb (Timeout#timeout): since async_interrupt_timing re-raises a deferred exception, replace the timeout exception with Timeout::Error after it. [Bug #7503] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38255 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/timeout.rb (Timeout#timeout): setkosaki2012-12-051-1/+62
| | | | | | | | | | | | | async_interrupt_timeing(:on_blocking) by default. [Bug #7503] [ruby-core:50524] * test/test_timeout.rb (#test_timeout_blocking): test for the above. * test/test_timeout.rb (test_timeout_immediate): ditto * test/test_timeout.rb (test_timeout_immediate2): ditto. * NEWS: news for the above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38216 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/timeout.rb (Timeout#timeout): propagate errors to thenobu2010-04-191-0/+6
| | | | | | | caller. [ruby-dev:41010]' git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27397 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/test_timeout.rb (TestTimeout#test_timeout): add a test.kazu2009-04-281-1/+14
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23302 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* add tests.akr2008-01-071-0/+13
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14937 b2dd03c8-39d4-4d8f-98ff-823fe69b080e