Skip to content

Commit 5af643a

Browse files
committed
Reverted actor_spec & added minitest to rakefile
1 parent 8a858e4 commit 5af643a

File tree

3 files changed

+271
-261
lines changed

3 files changed

+271
-261
lines changed

Rakefile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,24 @@ Gem::PackageTask.new(edge_gemspec) {} if edge_gemspec
6161

6262
CLEAN.include('lib/concurrent/2.*', 'lib/concurrent/*.jar')
6363

64+
6465
begin
6566
require 'rspec'
6667
require 'rspec/core/rake_task'
68+
require "rake/testtask"
69+
70+
Rake::TestTask.new(:minitest) do |t|
71+
t.libs << "test"
72+
t.test_files = FileList['test/**/test*.rb']
73+
end
6774

6875
RSpec::Core::RakeTask.new(:spec)
6976

77+
desc "Run both minitest & rspec tests"
78+
task test: %w[minitest spec] do
79+
80+
end
81+
7082
namespace :spec do
7183
desc '* Configured for ci'
7284
RSpec::Core::RakeTask.new(:ci) do |t|

lib/concurrent/executor/cached_thread_pool.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@ def ns_initialize(opts)
5252
if Concurrent.on_jruby?
5353
self.auto_terminate = opts.fetch(:auto_terminate, true)
5454
@max_queue = 0
55-
@executor = java.util.concurrent.Executors.newCachedThreadPool Concurrent::DaemonThreadFactory.new(self.auto_terminate?)
55+
@executor = java.util.concurrent.Executors.newCachedThreadPool(
56+
Concurrent::DaemonThreadFactory.new(self.auto_terminate?)
57+
)
5658
@executor.setRejectedExecutionHandler(FALLBACK_POLICY_CLASSES[@fallback_policy].new)
5759
@executor.setKeepAliveTime(opts.fetch(:idletime, DEFAULT_THREAD_IDLETIMEOUT), java.util.concurrent.TimeUnit::SECONDS)
5860
end

0 commit comments

Comments
 (0)