File tree Expand file tree Collapse file tree 2 files changed +23
-11
lines changed Expand file tree Collapse file tree 2 files changed +23
-11
lines changed Original file line number Diff line number Diff line change @@ -61,23 +61,12 @@ Gem::PackageTask.new(edge_gemspec) {} if edge_gemspec
6161
6262CLEAN . include ( 'lib/concurrent-ruby/concurrent/2.*' , 'lib/concurrent-ruby/concurrent/*.jar' )
6363
64-
65-
6664begin
6765 require 'rspec'
6866 require 'rspec/core/rake_task'
69- require "rake/testtask"
70-
71- Rake ::TestTask . new ( :minitest ) do |t |
72- t . libs << "test"
73- t . test_files = FileList [ 'test/**/test*.rb' ]
74- end
7567
7668 RSpec ::Core ::RakeTask . new ( :spec )
7769
78- desc "Run both minitest & rspec tests"
79- task test : %w[ minitest spec ]
80-
8170 namespace :spec do
8271 desc '* Configured for ci'
8372 RSpec ::Core ::RakeTask . new ( :ci ) do |t |
Original file line number Diff line number Diff line change @@ -201,6 +201,29 @@ module Concurrent
201201 end
202202 end
203203
204+ context 'auto terminate' do
205+
206+ # https://github.com/ruby-concurrency/concurrent-ruby/issues/817
207+ # https://github.com/ruby-concurrency/concurrent-ruby/issues/839
208+ it 'does not stop shutdown ' do
209+ Timeout ::timeout ( 10 ) do
210+ `
211+ bundle exec ruby -e "
212+ require 'concurrent-ruby'
213+ # the test relies on replicating that Minitest messed up the AtExit handling
214+ Concurrent.disable_at_exit_handlers!
215+ pool = Concurrent::CachedThreadPool.new
216+ pool.post do
217+ sleep # sleep indefinitely
218+ end
219+ # the process main thread should quit out which should kill the daemon CachedThreadPool
220+ "
221+ `
222+ end
223+ end
224+
225+ end
226+
204227 context 'stress' , notravis : true do
205228 configurations = [
206229 { min_threads : 2 ,
You can’t perform that action at this time.
0 commit comments