summaryrefslogtreecommitdiff
path: root/test/test_timeout.rb
AgeCommit message (Collapse)Author
2017-10-08Remove unnecessary `require 'thread'`kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60139 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-07Use our domain instead of other's domainkazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56093 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-07timeout.rb: custom error messagenobu
* lib/timeout.rb (Timeout#timeout): add custom error message argument. [Feature #11650] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56089 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-30Use qualified namesnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56037 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-16Add frozen_string_literal: false for all filesnaruse
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
2015-11-03test_timeout.rb: exact messagesnobu
* 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
2015-07-13use Timeout.timeoutnobu
* 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
2015-07-10test_timeout.rb: add an assertionnobu
* 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
2015-07-10timeout.rb: removed and use Timeout::Errornobu
* 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
2014-05-28test_thread.rb: move thread switch testnobu
* 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
2014-05-27* test/test_timeout.rb (test_timeout): inverted test condition.hsbt
[Bug #8523] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46159 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-08lib/timeout.rb: fallback to Timeout::Errornobu
* 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
2014-01-07timeout.rb: fix for ExitExceptionnobu
* 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
2014-01-07timeout.rb: defer creating custom exceptionnobu
* 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
2014-01-07test_timeout.rb: shorten waiting timesnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44516 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-27timeout.rb: raise given exceptionnobu
* 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
2013-08-26timeout.rb: skip rescuenobu
* 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
2012-12-07Revert r38216 and r38221. Release manager mark this feature as "next minor".kosaki
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38260 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-07timeout.rb: replace deferred exception after async_interrupt_timingnobu
* 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
2012-12-05* lib/timeout.rb (Timeout#timeout): setkosaki
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
2010-04-19* lib/timeout.rb (Timeout#timeout): propagate errors to thenobu
caller. [ruby-dev:41010]' git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27397 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-28test/test_timeout.rb (TestTimeout#test_timeout): add a test.kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23302 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-07add tests.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14937 b2dd03c8-39d4-4d8f-98ff-823fe69b080e